Skip to content
Snippets Groups Projects
Commit 20ffb353 authored by Laurent's avatar Laurent
Browse files

Merge branch 'hotline#24365-bad-encoded-degree' into 'hotline-master'

Hotline#24365 bad encoded degree

See merge request !929
parents 299713a2 5b4f4db2
Branches
Tags
2 merge requests!940Master,!939Master
- ticket #24365 : Amélioration de la prise en charge de l'encodage des "°" en iso2709
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'NoticeIntegrationTest.php';
/** @see http://forge.afi-sa.fr/issues/24365 */
class NoticeIntegrationOrpheeDegreeTest extends NoticeIntegrationTestCase {
public function setUp() {
parent::setUp();
Storm_Model_Loader::defaultToVolatile();
$this->loadNotice('unimarc_orphee_24365');
}
public function tearDown() {
Storm_Model_Loader::defaultToDb();
parent::tearDown();
}
public function getProfilDonnees() {
return Class_IntProfilDonnees::forOrphee()
->setIdProfil(110)
->getRawAttributes();
}
/** @test */
public function recordShouldHaveOneItem() {
$this->assertEquals(1, Class_Exemplaire::count());
}
/** @test */
public function recordShouldContainsValidUtf8Degree() {
$this->assertContains('N°', Class_Notice::find(1)->get_subfield(315, 'a')[0]);
}
}
\ No newline at end of file
01658 jm 2200313 450 001001500000071005900015100004100074101000800115127001100123200014500134210001900279215003200298315011300330327022900443345004800672686000800720700004000728701004200768702005000810702004700860702004200907702003700949711004800986801002201034801002601056856013201082999002201214995010801236frOr0884673113 aNS11bNascor  a20141215d2013 u y0frey0103 ba0 azxx a0108001 aMozart - Beethoven - Brahms - ScriabinfLorenzo SoulesgWolfgang Amadeus Mozart, Ludwig van Beethoven, Johannes Brahms, Alexandre Scriabine cNascordP.2013 a1 d. c.e1 brochure (40 p.) aChronique dans Telerama N 3347 p.52 du 05/03/2014 (4 / 4), Diapason N 629 p.120 du 03/11/2014 (4 / 6)1 aPiano concerto N24, K.491, do mineur / Wolfgang Amadeus Mozarta32 variations, WoO.80, dot mineur / Ludwig van Beethovena3 intermezzi, op. 117 / Johannes BrahmsaPiano sonata N9, op. 68, "Black mass" / Alexander Scriabine aGAMb3760142231119cdisque compactd17,41 E a311 131321702051aSoulesbLorenzo9piano 1aGaudenzbSimon9direction d'orchestre 1312013763aMozartbWolfgang Amadeusf1756-1791 1313891295aBeethovenbLudwig vanf1770-1827 1313891799aBrahmsbJohannesf1833-1897 131321702053aScriabinebAlexandre 131321702052aOrchestre de Chambre de Geneve 2aFRbGAMc20141215 2aFRbBM Bronc20141218 uhttp://www.gamannecy.com//upload/albums/201312/3760142231119_thumb.jpgzLorenzo Soules / Piano concerto N24, K.491, ut mineur aPhilippe TOURRENC00a000729467b884673113ccd6913f311 SOUg1h1i1w1x4y2z1C15/12/2014J30NmOFS6913V6913W4Z22528
\ No newline at end of file
......@@ -495,14 +495,17 @@ class Class_NoticeUnimarc_Writer extends Class_NoticeUnimarc {
chr(0x80) =>'€',
chr(0xa6) =>'€',
chr(0xc2).chr(0x92) => '\'',
chr(0x92) => '\'' ];
chr(0x92) => '\'',
'n'.chr(0xb0) => 'n°',
'N'.chr(0xb0) => 'N°',
];
$this->_iso_decode_table_2709 = array_keys($this->_iso_decode_table);
$this->_iso_decode_table_utf8 = array_values($this->_iso_decode_table);
$this->_iso_decode_table_2709 = array_keys($this->_iso_decode_table);
$this->_iso_decode_table_utf8 = array_values($this->_iso_decode_table);
}
function toUnimarcISO2709() {
public function toUnimarcISO2709() {
// supprime les lignes vides d'inner_data
$inner_directory = [];
$data = '';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment