php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19737 Problems in trasforming italian words with accent
Submitted: 2002-10-03 10:03 UTC Modified: 2002-11-10 18:17 UTC
Votes:7
Avg. Score:4.3 ± 0.9
Reproduced:0 of 0 (0.0%)
From: diego80 at libero dot it Assigned:
Status: No Feedback Package: XSLT related
PHP Version: 4CVS-2002-10-03 OS: FreeBSD 4.7-PRERELEASE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: diego80 at libero dot it
New email:
PHP Version: OS:

 

 [2002-10-03 10:03 UTC] diego80 at libero dot it
Hi with an xml files like this(pay attention to words with accent ?-?-?-?-?-?)

<?xml version="1.0"?>
<FOO>
   <NAME>il mio nome ? mai pi?</NAME>
</FOO>

and with a xsl file like
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="FOO">
   <xsl:value-of select="NAME">
</xsl:template>


using xslt_process(..) to trasform some error occur. While if we delete these accents (??????) it's all ok.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-03 10:05 UTC] diego80 at libero dot it
Hi with an xml files like this(pay attention to words with accent
?-?-?-?-?-?)

<?xml version="1.0"?>
<FOO>
   <NAME>il mio nome ? mai pi?</NAME>
</FOO>

and with a xsl file like
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="FOO">
   <xsl:value-of select="NAME">
</xsl:template>
</xsl:stylesheet>

using xslt_process(..) to trasform some error occur. While if we delete
these accents (??????) it's all ok.
 [2002-10-03 10:09 UTC] cynic@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


"some error occur"???
http://bugs.php.net/how-to-report.php
http://www.tuxedo.org/~esr/faqs/smart-questions.html
 [2002-10-04 03:55 UTC] diego80 at libero dot it
yes, apologize me for short description i made..

so when we transform with sablotron the transformation fail SURELY with chars ? (not ?) and ?. While with the other accents (?-?-?-?) rendering is not exact:

\n -> carriage return
infact the expression "?\n" became "???", then "?\n" became "͊", "?\n" became "荊".
I don't know how sablotron works but it seem that it doesnt support all characters or combination of that

I though was my xsl to fail but it'isnt because i try to make the transformation simply applyng the xml-stylesheet to file xml and the transformation occur without problems each letter is transformed correctly.

Please contact me for more description, for me is very important to resolve this problem.
(ICQ : 69001294
MSN: diego.zecchini@lib.unimib.it
 [2002-10-04 05:27 UTC] hholzgra@php.net
xml default encoding is Unicode UTF-8

if you want to use european ISO 8859-1 
cahracter codes you have to say so:

<?xml version='1.0' encoding='iso-8859-1'>

if you don't then behaviour on non-ascii characters
is undefined, so it may work but you can't complain 
if it doesn't
 [2002-10-05 05:57 UTC] diego80 at libero dot it
thank a lot for your availability.  
I do as you say.
I used the european encoding iso-8859-1
now the PI of my xml file is
<?xml version='1.0' encoding='iso-8859-1'>

but it doesn't works.
the function it generate the error is dump_mem that when called with arguments TRUE and iso-8859-1 ( dump_mem(TRUE, 'iso-8859-1') ) return the errors:

[error] PHP Warning:  output conversion failed due to conv error
[error] PHP Warning:  Bytes: 0xE0 0x20 0x64 0x6F
[error] PHP Warning:  xmlOutputBufferWrite: encoder error

in particular the char that generate the error is "?".
 [2002-10-15 16:51 UTC] daveviner at yahoo dot com
You might want to try adding this line to your XSL stylesheet:
  <xsl:output method="xml" encoding="ISO-8859-1" />

This should force the xslt engine to output characters only in latin-1.
 [2002-10-26 12:05 UTC] msopacua@php.net
I really can't reproduce this (even after fixing the xml PI with the necessary ?> end).
I've tested this with 2 independant, FreeBSD 4.7-STABLE machines, upgraded today.
If you are still facing this error, please package all related files in a tar.gz and make it available for download or send me via mail.


Redefined category
 [2002-11-10 18:17 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC