RE: Another coding question.

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Sorry - couldn't find mo_recode in urltrans.c. what I did was simply
search the string for bytes that have the MSB set and if any found -
code to UCS2. 
the down side is that this way I will code to UCS2 in cases where
ISO-8859-8 will do, which will surely break keyword matching.

--
Oded Arbel
m-Wise Inc.
[email protected]

"I am afraid that as death becomes less certain, taxes will get worse."
 -- Mary Smith


> -----Original Message-----
> From: Bruno David Rodrigues [mailto:[email protected]]
> Sent: Tuesday, March 12, 2002 10:44 PM
> To: Oded Arbel; Kannel-devel (E-mail)
> Subject: Re: Another coding question.
> 
> 
> I've done the "lamer" way.
> I'm searching for "&#" text and if present, fall back to ucs2
> 
> That's somewhere in urltrans.c, check for "mo_recode"
> 
> ----- Original Message ----- 
> From: "Oded Arbel" <[email protected]>
> To: "Kannel-devel (E-mail)" <[email protected]>
> Sent: Monday, March 11, 2002 5:45 PM
> Subject: Another coding question.
> 
> 
> Hi list.
> 
> in a follow up to my last coding question : when receiving the UTF-8
> encoded text, what I wanted to do is to try to encode it to 7 
> bit ASCII,
> if not successful (have chars that need more then 7 bit, i.e. high
> iso-8859-8 chars) I will then try to encode to ISO-8859-8 and if that
> does not succeed (message probably has unicode characters that are not
> part of iso-8859-8) I will then encode to UCS-2. 
> Now the problem is that when I try to encode to ASCII or ISO-8859-8,
> encoding always succeed, and unicode characters get 
> translated into HTML
> entities (for example &#1505;). is there a way to stop it from doing
> that and simply fail the conversion ?
> 
> I remember something similar to this discussed on the list, 
> but the mail
> archive search refused to help me locate it (didn't like me entering
> weird characters, like & ;-)
> 
> 
> --
> Oded Arbel
> m-Wise Inc.
> [email protected]
> 
> "The cynics are right nine times out of ten."
> -- Henry Louis Mencken
> 
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.