Hello....
-- I am looking for a method to represent a String in the proper way, in order to use if for an HTTP Get request, when the String contains characters from the extended list (specifically, accented characters). Before I write my own, I am hoping to find something already in place. For example.... 'This message must be translated' turns into... 'This%20message%0D%0Amust%20be%20translated' When it is going to be sent as part of the message body in an HTTP Get request. Spaces must be represented by %20, and line delimiters must be replaced by %0A. In String, there is the #sstUrlEncode method I was hoping would do the trick....but it does not handle extended characters correctly. For example, the name 'ANDRÉA' gets turned into 'ANDR%C9A', using %C9 to represent the accented upper case E. But this does not work...apparently, I must use %C3%89 to represent this character. So the name SHOULD be 'ANDR%C3%89A'. I found this table, which seems to have the right info... http://www.i18nqa.com/debug/utf8-debug.html Can anyone steer me in the right direction? Thanks in advance for any help... Regards, Julian Ford You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Julian,
-- How about doing something like this: ('ANDRÉA' convertToCodePage: 'UTF-8') sstUrlEncode Regards Nadja Am Mittwoch, 13. Dezember 2017 01:53:08 UTC+1 schrieb [hidden email]:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hello, Nadja.
-- That worked perfectly....thank you! I did suspect I was going to feel dumb when I heard the answer..... THANKS! Julian On Wednesday, December 13, 2017 at 2:30:20 AM UTC-5, [hidden email] wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |