locked
iso-8859-1 encoding??? RRS feed

  • Question

  • How i can i work with iso-8859-1 encoding on Silverlight?

    I'm trying to get a text that contains accented characters.

    For example, im consuming a webservice that will return that string: lómmêz. The string return with that value "l?mm?z".

    How can i do that? Is a limitation of Silverlight?

    thanks

    Wednesday, November 10, 2010 8:05 PM

Answers

  • Hi, silverlight cant work with ANSI encodings. Change service response encoding to Unicode, so SL can understand it.

    Thursday, November 11, 2010 2:35 AM

All replies

  • Hi, silverlight cant work with ANSI encodings. Change service response encoding to Unicode, so SL can understand it.

    Thursday, November 11, 2010 2:35 AM
  • Hi. Side-note: Silverlight also does not support all unicode encodings (e.g. UTF32 is not supported). My recommendation is to use UTF-8, which is the most common on the the web anyway. See this for more details.

    Thursday, November 11, 2010 3:26 AM
  • That´s to bad to know that.

    I dont have access to the webservice source code.

    In my point of view, this is serious limitation and a basic feature that Silverlight must have. In a globalized world, i dont understand why that feature was not implemented.

    There is something that i can do?

    If not, i'll have to abandon Silverlight and my project that have spent money and hours of work, and wait for a release of SL that will implement ansi encodings.

    Thanks

    Thursday, November 11, 2010 7:02 AM
  • I was tempted to post this link in my first reply, but the solution provided there has its implications (like significant worse performance), so it's always better to change the encoding to one of the supported types that are built-in. However, in cases like yours when there's no other chance you should go ahead and use something like that.

    In my point of view, this is serious limitation and a basic feature that Silverlight must have. In a globalized world, i dont understand why that feature was not implemented.

    I think the exact opposite is true. If you target a globalized world, then it's a very bad idea to use a specific character set like Latin-1 to implement a web service; using the de facto standard UTF-8 is preferred in almost all cases.

    Thursday, November 11, 2010 7:40 AM