[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: url encoding gets wrong with åöä?

Subject: RE: url encoding gets wrong with åöä?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 7 Jun 2006 12:03:47 +0100
eclipse character encoding
This thread seems to have gone off at a complete tangent.

(a) There are any number of editors that handle iso-8859-1 on Windows, or at
any rate cp-1252 which is a good enough approximation for present purposes.
This isn't the issue.

(b) Calling an extension function to do URL encoding is a perfectly
reasonable thing to do if you want to achieve something that the standard
XSLT-generated encoding doesn't do. However, the suggestion that the
encoding used by the extension function depends on the encoding of the
stylesheet containing the call to the extension function seems pretty
implausible.

In fact, the one-argument form of java.net.URLEncoder.encode() uses the
default encoding of the platform, and is deprecated for that reason. There
is a two-argument form in which the second argument is the encoding you want
to use, for example "UTF-8" or "ISO-8859-1". The documentation of this
method states clearly:

Note: The  World Wide Web Consortium Recommendation states that UTF-8 should
be used. Not doing so may introduce incompatibilites.

None of this gets to the root of the problem, which is why percent-encoding
the URL using UTF-8 encoding, as specified in all the standards, isn't
working in your case. In general, it's a good idea to understand a problem
before you start groping around in a blind search for a workaround.

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


> -----Original Message-----
> From: Abel Braaksma Online [mailto:abel.online@xxxxxxxxx]
> Sent: 07 June 2006 11:47
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  url encoding gets wrong with evd?
>
> Hi Niklas,
>
> Eclipse is free: www.eclipse.org. It is a development
> environment and it can help you with developing XML, XSLT and
> programming (if you'd need it). You can find any nice text
> editor in this list:
> http://en.wikipedia.org/wiki/List_of_text_editors. Decide
> which you want based on it's capability of viewing a
> text-only document in different encodings.
>
> As a matter of fact, you can judge the encoding of your
> document by loading into Internet Explorer (as a .txt file)
> and choose some different encodings from the View -->
> Encoding menu. A handy shortcut I often find myself using
> when I have to find out what encoding / language a text is in
> (I do business with some Baltic states, have a different
> character map than your Latin-1).
>
> Cheers,
> Abel
>
> Niklas Holmberg wrote:
>
> >I don't have eclipse. Anybody know a good editor (for
> windows) that can save correct ISO-8859-1 documents?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.