473,324 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Encoding to ISO-8859-1 problems

Hi,
We are trying to encode to ISO-8859-1, but we have problems doing it using
the encoders in .NET. We get some unknown characters in some culture which
comes out fine if we post (from IE) from a page in ISO-8859-1 to another
page using ISO-8859-1, but cannot take a .NET string or a UTF-8 string,
convert it in ISO-8859-1 and display it with this encoding using the same
content in the string...

Are there anyone that know how IE does it? Is there any correspondance
table, are the any information into the unicode encoding that says "this
character has this style and should convert to another character with this
style" or something like it?

Thanks

ThunderMusic
Feb 1 '07 #1
6 1662
ThunderMusic <No*************************@NoSpAm.comwrote:
We are trying to encode to ISO-8859-1, but we have problems doing it using
the encoders in .NET. We get some unknown characters in some culture which
comes out fine if we post (from IE) from a page in ISO-8859-1 to another
page using ISO-8859-1, but cannot take a .NET string or a UTF-8 string,
convert it in ISO-8859-1 and display it with this encoding using the same
content in the string...

Are there anyone that know how IE does it? Is there any correspondance
table, are the any information into the unicode encoding that says "this
character has this style and should convert to another character with this
style" or something like it?
It's not very clear exactly what's going on. It's quite possible that
when you post in IE, it's not using 8859-1 for the post even if the
pages returned *are* genuinely using 8859-1. It's hard to see how it
would be displayed in that case though.

If a character isn't in 8859-1, you won't be able to represent it in
8859-1.

Do you *have* to use 8859-1 rather than an encoding which can represent
the whole of Unicode (eg UTF-8)?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 1 '07 #2
it's actually because we are sending mails to hotmail, and because our
application is in utf-8 and hotmail uses ISO-8859-1, so if we send a message
encoded using UTF-8, the displayed message comes out plain ugly in
hotmail...

So we must find a way to convert things correctly... to give an exemple of
what should be converted... a character like the oe (o and e tied together)
should be converted to ISO-8859-1 oe (o and e separatly) because the "tied
together" version does not exists in 8859-1...

Anyone knows how to do it seemlessly?

Thanks

ThunderMusic

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
ThunderMusic <No*************************@NoSpAm.comwrote:
>We are trying to encode to ISO-8859-1, but we have problems doing it
using
the encoders in .NET. We get some unknown characters in some culture
which
comes out fine if we post (from IE) from a page in ISO-8859-1 to another
page using ISO-8859-1, but cannot take a .NET string or a UTF-8 string,
convert it in ISO-8859-1 and display it with this encoding using the same
content in the string...

Are there anyone that know how IE does it? Is there any correspondance
table, are the any information into the unicode encoding that says "this
character has this style and should convert to another character with
this
style" or something like it?

It's not very clear exactly what's going on. It's quite possible that
when you post in IE, it's not using 8859-1 for the post even if the
pages returned *are* genuinely using 8859-1. It's hard to see how it
would be displayed in that case though.

If a character isn't in 8859-1, you won't be able to represent it in
8859-1.

Do you *have* to use 8859-1 rather than an encoding which can represent
the whole of Unicode (eg UTF-8)?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Feb 1 '07 #3
ThunderMusic <No*************************@NoSpAm.comwrote:
it's actually because we are sending mails to hotmail, and because our
application is in utf-8 and hotmail uses ISO-8859-1, so if we send a message
encoded using UTF-8, the displayed message comes out plain ugly in
hotmail...
Does Hotmail *really* only use ISO-8859-1? Eek - how horrible.
So we must find a way to convert things correctly... to give an exemple of
what should be converted... a character like the oe (o and e tied together)
should be converted to ISO-8859-1 oe (o and e separatly) because the "tied
together" version does not exists in 8859-1...

Anyone knows how to do it seemlessly?
Right. At that point you're talking about much more than just normal
encoding - and unfortunately we've reached the limit of my knowledge
there :(

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 1 '07 #4
actually, hotmail supports 4 types of encoding, but not UTF-8 nor UTF-16, so
it's becoming a problem...

Thanks... I'm still searching for informations on the net...

ThunderMusic

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
ThunderMusic <No*************************@NoSpAm.comwrote:
>it's actually because we are sending mails to hotmail, and because our
application is in utf-8 and hotmail uses ISO-8859-1, so if we send a
message
encoded using UTF-8, the displayed message comes out plain ugly in
hotmail...

Does Hotmail *really* only use ISO-8859-1? Eek - how horrible.
>So we must find a way to convert things correctly... to give an exemple
of
what should be converted... a character like the oe (o and e tied
together)
should be converted to ISO-8859-1 oe (o and e separatly) because the
"tied
together" version does not exists in 8859-1...

Anyone knows how to do it seemlessly?

Right. At that point you're talking about much more than just normal
encoding - and unfortunately we've reached the limit of my knowledge
there :(

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Feb 1 '07 #5

"ThunderMusic" <No*************************@NoSpAm.comwrote in message
news:u3**************@TK2MSFTNGP02.phx.gbl...
it's actually because we are sending mails to hotmail, and because our
application is in utf-8 and hotmail uses ISO-8859-1, so if we send a
message
encoded using UTF-8, the displayed message comes out plain ugly in
hotmail...

So we must find a way to convert things correctly... to give an exemple of
what should be converted... a character like the oe (o and e tied
together)
should be converted to ISO-8859-1 oe (o and e separatly) because the "tied
together" version does not exists in 8859-1...

Anyone knows how to do it seemlessly?
The discrepancy you are seeing in the way IE behaves is due to windows
drawing a correlation between the OEM codepage 1252 and the ISO-8859-1.
Windows-1252 is character set based on ISO-8859-1 in that all characters
have the same encoding except for characters in the 128-159 range. In this
range ISO-8859-1 has a set of control codes that are almost never used these
days. Windows-1252 borrows this area to squeeze in some extra characters.

When a page coming from source claiming ISO-8859-1 charset uses characters
in this range IE just renders the Windows-1252 characters for them. However
something sticking more strictly to ISO-8859-1 just doesn't know what to do
with them.

This doesn't solve your problem I know. If what you say is true then
hotmail is unable to communicate well with all it's possible clients.
That's so shocking it leaves me wondering whether there is something else
wrong.

Can you show some code you are using to generate the email?

Feb 2 '07 #6
If what you say is true then
hotmail is unable to communicate well with all it's possible clients.
That's so shocking it leaves me wondering whether there is something else
wrong.
I strongly-strongly doubt that hotmail is unable to handle UTF-8
Can you show some code you are using to generate the email?
Agree, most likely the probem is here :-)
From experience I know that the chances that I discov a bug in a compiler are
slim (happened two times only). So before blaming something on the compiler,
I check my code 30 times!

This is one of those. I am so sure that hotmail can handle utf-8, that I
would check my code 30 times :-)
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Feb 2 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at...
43
by: Vladimir | last post by:
Method UnicodeEncoding.GetMaxByteCount(charCount) returns charCount * 2. Method UTF8Encoding.GetMaxByteCount(charCount) returns charCount * 4. But why that? Look: /* Each Unicode character...
10
by: Christopher H. Laco | last post by:
Long story longer. I need to get web user input into a backend system that a) only grocks single byte encoding, b) expectes the data transer to be 1 bytes = 1 character, and c) uses the HP Roman-6...
5
by: DbNetLink | last post by:
I am trying to convert some Japanese text encoded as Shift-JIS/ISO-2022-JP to UTF-8 so I can store all data in my database with a common encoding. My problem is the encoding conversion code works...
9
by: Andy | last post by:
I am trying to write a for loop that will print all the ISO-Latin characters to a database. However: I am not sure exactly how to go about printing the ISO-Latin character set. Would anyone be...
9
by: Mark | last post by:
I've run a few simple tests looking at how query string encoding/decoding gets handled in asp.net, and it seems like the situation is even messier than it was in asp... Can't say I think much of the...
5
by: Michiel | last post by:
problem: pasting characters from MSWord into wysiwyg editor (tinyMCE) When we paste text from Word (i.e. MSWindows) to the browser, and in the text is any special character, like smart quotes,...
0
by: yuvalbra | last post by:
Hello , I work with asp and send email by cdonts and want to get in in 1255 ISO-Logical encoding every email i got the numbers shows backwords , i need to goto to encoding and replace to...
4
by: kettle | last post by:
Hi, I am rather new to python, and am currently struggling with some encoding issues. I have some utf-8-encoded text which I need to encode as iso-2022-jp before sending it out to the world. I am...
8
by: lisa1987i | last post by:
I am really having trouble with encoding characters. The application I am creating i based on a NNTP component from Smilla smilla.ru My propblem is when I read a string which contain special...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.