Thanks for the help. It does work if I manually type in ?val=M%c3%a9xico
 
As Mike said initially, if the link is in a UTF8 web page then it works fine. 
The problem I have is when typing in a url directly or editing an existing url. 
Not sure there's any way around it though.
 
 
________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Clippinger
Sent: 18 August 2008 14:32
To: General Mark Logic Developer Discussion
Subject: RE: [MarkLogic Dev General] Bad Codepoint error


You can use xdmp:url-encode() to get the UTF8 encoding:
 
xdmp:url-encode("México")
=> M%c3%a9xico
 
James


________________________________

        From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael 
Sokolov
        Sent: Monday, August 18, 2008 9:17 AM
        To: 'General Mark Logic Developer Discussion'
        Subject: RE: [MarkLogic Dev General] Bad Codepoint error
        
        
        Yes, %E9 is ISO-8859-1 for e-acute, not UTF-8, which will be a 
multi-byte sequence. Sorry, don't have the right code for you off the top of my 
head...


________________________________

                From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
Whitby, Rob, CMG
                Sent: Monday, August 18, 2008 8:00 AM
                To: General Mark Logic Developer Discussion
                Subject: RE: [MarkLogic Dev General] Bad Codepoint error
                
                
                Thanks for the quick reply.
                 
                This happens when I type the url into a browser (tried in 
Firefox and IE), so I don't have any opportunity to set a charset.
                 
                I tried typing in the URL encoded:
                ?val=M%E9xico
                 
                But the same error still occurs...
                 
                Could this be something to do with collations? The app server 
is using http://marklogic.com/collation/
                I have tried changing it to 
http://marklogic.com/collation/codepoint but no difference.
                 
                thanks!
                Rob
                 

________________________________

                From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
Michael Sokolov
                Sent: 18 August 2008 12:44
                To: 'General Mark Logic Developer Discussion'
                Subject: RE: [MarkLogic Dev General] Bad Codepoint error
                
                
                This is almost certainly a character set mixup - your parameter 
value is being interpreted first in one charset (probably iso-8859-1 or 
windows-1252) and then utf-8.  There's no HTTP standard on url character sets, 
amazingly, but many web app servers respect the character set passed in the 
content-type header, and most browsers will pass this along based on the 
character set of the page from which the link comes.  Another possibility if it 
is difficult to fix this would be to url-encode the characters (using the utf-8 
encoding)
                 
                -Mike


________________________________

                        From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
Behalf Of Whitby, Rob, CMG
                        Sent: Monday, August 18, 2008 7:34 AM
                        To: [email protected]
                        Subject: [MarkLogic Dev General] Bad Codepoint error
                        
                        
                        Hi,
                         
                        I'm having a problem sending variables in the 
querystring to an xquery file. (The error only occurs when I use the 
querystring - not when using XCC)
                         
                        I have a simple xquery on an HTTP app server:
                         
                        xdmp:get-request-field("val")
                         
                         
                        It works fine with:
                        ?val=Mexico
                         
                        but errors with (note the e acute):
                        ?val=México
                         
                        There is no http response at all from MarkLogic but the 
error log has:
                        Error: AppConnectionTask::run: SVC-BAD: Bad 
CodepointIterator::_next 
                         
                        Any one got any ideas?
                         
                        Thanks
                        Rob
                         
                         
                         
                         
                        Rob Whitby
                        Senior Developer
                        Current Medicine Group
                        
                        t: +44 (0)20 7562 2981
                        e: [EMAIL PROTECTED]
                        w: www.currentmedicinegroup.com 
<http://www.currentmedicinegroup.com/>  
                        

                        The contents of this e-mail (including any attachments) 
are confidential and may be legally privileged. If you are not the intended 
recipient of this e-mail, any disclosure, copying, distribution or use of its 
contents is strictly prohibited, and you should please notify the sender 
immediately and then delete it (including any attachments) from your system. 
The opinions expressed within this communication do not necessarily reflect the 
views held by Current Medicine Group.
                         
                        Current Medicine Group is a part of Springer 
Science+Business Media. VAT No. GB 823 8263 26. Registered in England and Wales 
No. 1952472.
                         

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to