French Collation (ignore accents)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

French Collation (ignore accents)

Pierrick Brihaye
Hi,

[this issue was formerly bug #1437315 :
http://sourceforge.net/tracker/index.php?func=detail&aid=1437315&group_id=29872&atid=397617)

With the latest Saxon 8.7, Trying :

xquery version "1.0" encoding "iso-8859-1";
declare default collation
'http://saxon.sf.net/collation?lang=fr-FR;strength=primary';
let $test :=
<test><node>télé</node></test>
return (
<a>{$test[node = "tele"]}</a>,
<b>{$test[contains(node, "tele")]}</b>
)

I get (with !encoding="cp850" as a command-line option for my french
Windows XP) :
<?xml version="1.0" encoding="cp850"?>
<a>
    <test>
       <node>télé</node>
    </test>
</a>
<b/>

Shouldn't <b/> have the same content as <a/> ?

PS : would it make sense to consider System.getProperty("file.encoding")
rather than "UTF-8" as the default input encoding ?

Cheers,

p.b.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: French Collation (ignore accents)

Michael Kay
Thanks for reporting this. I have logged the problem at

https://sourceforge.net/tracker/index.php?func=detail&aid=1444006&group_id=2
9872&atid=397617

and have provided a replacement version of the relevant module. This solves
the problem in your case (with both JDK 1.4.2_06 and JDK 1.5.0_06) but it is
not fully regression-tested. (I mention the Java version because this is an
area where I have found differences of behaviour between different Java
versions in the past).

Concerning your suggestion to change the default encoding for a query, I
think it would be confusing to have one default for XML and a different
default for XQuery.

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Pierrick Brihaye
> Sent: 04 March 2006 13:32
> To: [hidden email]
> Subject: [saxon] French Collation (ignore accents)
>
> Hi,
>
> [this issue was formerly bug #1437315 :
> http://sourceforge.net/tracker/index.php?func=detail&aid=14373
> 15&group_id=29872&atid=397617)
>
> With the latest Saxon 8.7, Trying :
>
> xquery version "1.0" encoding "iso-8859-1";
> declare default collation
> 'http://saxon.sf.net/collation?lang=fr-FR;strength=primary';
> let $test :=
> <test><node>télé</node></test>
> return (
> <a>{$test[node = "tele"]}</a>,
> <b>{$test[contains(node, "tele")]}</b>
> )
>
> I get (with !encoding="cp850" as a command-line option for my french
> Windows XP) :
> <?xml version="1.0" encoding="cp850"?>
> <a>
>     <test>
>        <node>télé</node>
>     </test>
> </a>
> <b/>
>
> Shouldn't <b/> have the same content as <a/> ?
>
> PS : would it make sense to consider
> System.getProperty("file.encoding")
> rather than "UTF-8" as the default input encoding ?
>
> Cheers,
>
> p.b.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking
> scripting language
> that extends applications into web and mobile media. Attend
> the live webcast
> and join the prime developer group breaking into this new
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&
> dat=121642
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help