iso-8859-1

How to normalize text content to UTF 8 in java

We have a CMS which has several thousand text/html files in it. It turns out that users have been uploading text/html files using various character encodings (utf-8,utf-8 w BOM, windows 1252, iso-8859-1). When these files are read in and written to the response our CMS's framework forces a charset=UTF-8 on the response's content-type at...

NSString to NSData Failing in Encoding

I'm trying to use NSXmlParser to parse ISO-8859-1 data. Using Apple's own example for parsing ISO-8859-1, I have the following. // path to xml file NSString *xmlFilePath = [[NSBundle mainBundle] pathForResource:sampleFileName ofType:@"xml"]; // string of xml contents NSString *xmlFileContents = [NSString stringWithContentsOfFile:xmlFil...

Text not encoded properly.

In my masterpage, I have the following in the header. This allows me to put special characters into my website. The problem is that when javascript tries to load (on the client) special characters, I get that weird box. Example url... http://89.184.149.229/Sandportal/vinnan/trol-lna/monica-sakk--vikuskiftinum Text is below the 4 st...

Normalizing (webdav) unicode paths

Hi guys, I'm working on a WebDAV implementation for PHP. In order to make it easier for Windows and other operating systems to work together, I need jump through some character encoding hoops. Windows uses ISO-8859-1 in it's HTTP request, while most other clients encode anything beyond ascii as UTF-8. My first approach was to ignore t...

'£' character does not seem to encode properly - expect '%a3' but get '%u00a3'

Hello, I want to send The pound sign character i.e. '£' encoded as ISO-8859-1 across the wire. I perform this by doing the following: var _encoding = Encoding.GetEncoding("iso-8859-1"); var _requestContent = _encoding.GetBytes(requestContent); var _request = (HttpWebRequest)WebRequest.Create(target); _request.Headers[HttpRequestHeader...

Encoding issue - 2nd band of ISO-8859-1 values do not get encoded?

Hello, I want to send the pound sign character i.e. '£' encoded as ISO-8859-1 across the wire. I perform this by doing the following: var _encoding = Encoding.GetEncoding("iso-8859-1"); var _requestContent = _encoding.GetBytes(requestContent); var _request = (HttpWebRequest)WebRequest.Create(target); _request.Headers[HttpRequestHea...

using .NET how to convert iso8859-1 encoded text files that contain Latin-1 accented characters to utf-8

I am being sent text files saved in iso88591-1 format that contain accented characters from the Latin-1 range (as well as normal ASCII a-z etc). How to convert these files to utf-8 using C# so that the single-byte accented characters in iso8859-1 become valid utf-8 characters? I have tried to use a StreamReader with ASCIIEncoding, and ...

JQuery punctuation for spanish (ó, í, etc.) not working in IE8

Hello, Im working with jquery and ASP, and have an SQL database from which I get, using the function $.getJSON(), some descriptions in spanish with "acentos" and "tildes" (á, é, í, ó, ú, ñ, etc.). With Chrome 4 and FireFox is working fine. The problem is with IE8: with some particular query, it hangs without getting the result back. If ...

How can I convert a bunch of files from ISO-8859-1 to UTF-8 using Perl?

I have several documents I need to convert from ISO-8859-1 to UTF-8 (without the BOM of course). This is the issue though. I have so many of these documents (it is actually a mix of documents, some UTF-8 and some ISO-8859-1) that I need an automated way of converting them. Unfortunately I only have ActivePerl installed and don't know muc...

How do I decode mail header strings with their encoding type in them in PHP

I'm creating a small, web based, mail client in PHP and noticed that a number of email Subjects and Contents appear as follows: =?ISO-8859-1?Q?Everything_for_=A35_-_Box_Sets,_Games_?= =?ISO-8859-1?Q?and_CD_Soundtracks...hurry,_ends_soon?= =?utf-8?B?UGxheS5jb206IE9uZSBEYXkgT25seSDigJMgT3V0IG9mIHRoaXMgV29ybGQgRGVhbHMh?= =?windows-1252?Q?J...

Dealing with ISO-encoding in AJAX requests (prototype)

I have a HTML-page, that's encoded in ISO-8859-1 and a Prototype-AJAX call that's build like this: new Ajax.Request('api.jsp', { method: 'get', parameters: {...}, onSuccess: function(transport) { var ajaxResponse = transport.responseJSON; alert(ajaxResponse.msg); } }); The api.jsp returns its data in IS...

ISO-8859-1 decode vb.net

Hello, I'm having problems decoding a file with "ISO-8859-1" encoding. For example, I can't decode "%E7" to "ç". Can you help me? P.S.: I'm using VB.NET Thanks, Pedro ...

Servlet receiving data both in ISO-8859-1 and UTF-8. How to URL-decode?

I've a web application (well, in fact is just a servlet) which receives data from 3 different sources: Source A is a HTML document written in UTF-8, and sends the data via <form method="get">. Source B is written in ISO-8859-1, and sends the data via <form method="get">, too. Source C is written in ISO-8859-1, and sends the data via <a...

If I use Unicode on a ISO-8859-1 site, how will that be interpreted by a browser?

So I got a site that uses ISO-8859-1 encoding and I can't change that. I want to be sure that the content I enter into the web app on the site gets parsed correctly. The parser works on a character by character basis. I also cannot change the parser, I am just writing files for it to handle. The content in my file I am telling the ap...

&#353; and other char not visible

Hi All, I'm be wild about some CZECH char. On DB I've saved strings with č (and similar chars) and I'm able to show this only if I set my page charset to ISO-8859-1. It could be ok, but I've an UTF-8 XML file and when I try to get some string from this xml I've some problem. Basically the string from XML will not be shown correctly if...

PHP - ___ encoding to UTF-8 - is there an end-all solution?

I've looked across the web, I've looked through SO, through PHP documentation and more. It seems like a ridiculous problem not to have a standard solution to. If you get an unknown character set, and it has strange characters (like english quotes), is there a standard way to convert them to UTF-8? I've seen many messy solutions using a...

charsets in MySQL replication

Hi guys, What can I do to ensure that replication will use latin1 instead of utf-8? I'm migrating between an MySQL 5.1.22 server (master) on a Linux system and a MySQL 5.1.42 server (slave) on a FreeBSD system. My replication works well, but when non-ascii characters are in my varchars, they turn "weird". The Linux/MySQL-5.1.22 shows ...

Java InputStream encoding/charset

Running the following (example) code import java.io.*; public class test { public static void main(String[] args) throws Exception { byte[] buf = {-27}; InputStream is = new ByteArrayInputStream(buf); BufferedReader r = new BufferedReader( new InputStreamReader(is, "ISO-8859-1")); Str...

jQuery set ISO charset to ajax request

Hi, i'm using jQuery for sending ajax requests to the server, but i have some problems with the charset. In the ajax function documentation is written that data is always sent in UTF-8 according to the W3C XMLHTTPRequest standard, so i don't think that jQuery allows you to change the request charset (except if you load a script, but that...

Submitted character encoding -- _charset_ hidden field

For our web app, we have multiple HTML pages containing text areas. All of our pages are rendered with an ISO-8859-1 charset. When the page is accessed through IE6 on a Windows machine and special characters such as a "smart quote" are copied in to the text area, some of our pages submit the page using the Windows 1252 character encodi...