Questions tagged [iso-8859-1]

iso-8859-1 is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 1987.

ISO/IEC 8859-1:1998, Information technology — 8-bit single-byte coded graphic character sets — Part 1: Latin alphabet No. 1, is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 1987. It is informally referred to as Latin-1. It is generally intended for “Western European” languages (see below for a list). It is by far the most popular 8-bit character set in the world, and virtually every character set in modern use shares some similarity to it (for instance it defines the first 256 code point assignments in Unicode).

ISO-8859-1 is the IANA preferred charset name for this standard when supplemented with the C0 and C1 control codes from ISO/IEC 6429. The following other aliases are registered for ISO-8859-1: ISO_8859-1, iso-ir-100, csISOLatin1, latin1, l1, IBM819, CP819.

785 questions
497
votes
8 answers

What is the difference between UTF-8 and ISO-8859-1?

What is the difference between UTF-8 and ISO-8859-1?
Jagadesh
  • 6,489
  • 8
  • 29
  • 30
244
votes
8 answers

HTML encoding issues - "Â" character showing up instead of " "

I've got a legacy app just starting to misbehave, for whatever reason I'm not sure. It generates a bunch of HTML that gets turned into PDF reports by ActivePDF. The process works like this: Pull an HTML template from a DB with tokens in it to be…
Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
117
votes
9 answers

C# Convert string from UTF-8 to ISO-8859-1 (Latin1) H

I have googled on this topic and I have looked at every answer, but I still don't get it. Basically I need to convert UTF-8 string to ISO-8859-1 and I do it using following code: Encoding iso = Encoding.GetEncoding("ISO-8859-1"); Encoding utf8 =…
Daniil Harik
  • 4,619
  • 10
  • 55
  • 60
85
votes
8 answers

How do I convert between ISO-8859-1 and UTF-8 in Java?

Does anyone know how to convert a string from ISO-8859-1 to UTF-8 and back in Java? I'm getting a string from the web and saving it in the RMS (J2ME), but I want to preserve the special chars and get the string from the RMS but with the ISO-8859-1…
c4r1o5
68
votes
8 answers

Converting UTF-8 to ISO-8859-1 in Java - how to keep it as single byte

I am trying to convert a string encoded in java in UTF-8 to ISO-8859-1. Say for example, in the string 'âabcd' 'â' is represented in ISO-8859-1 as E2. In UTF-8 it is represented as two bytes. C3 A2 I believe. When I do a getbytes(encoding) and then…
luckylak
61
votes
11 answers

Setting the character encoding in form submit for Internet Explorer

I have a page that contains a form. This page is served with content type text/html;charset=utf-8. I need to submit this form to server using ISO-8859-1 character encoding. Is this possible with Internet Explorer? Setting accept-charset attribute to…
Juha Syrjälä
  • 33,425
  • 31
  • 131
  • 183
59
votes
4 answers

Convert latin1 characters on a UTF8 table into UTF8

Only today I realized that I was missing this in my PHP scripts: mysql_set_charset('utf8'); All my tables are InnoDB, collation "utf8_unicode_ci", and all my VARCHAR columns are "utf8_unicode_ci" as well. I have mb_internal_encoding('UTF-8'); on my…
Nuno
  • 3,082
  • 5
  • 38
  • 58
57
votes
5 answers

How do I write out a text file in C# with a code page other than UTF-8?

I want to write out a text file. Instead of the default UTF-8, I want to write it encoded as ISO-8859-1 which is code page 28591. I have no idea how to do this... I'm writing out my file with the following very simple code: using (StreamWriter sw =…
adeena
  • 4,027
  • 15
  • 40
  • 52
53
votes
10 answers

Convert utf8-characters to iso-88591 and back in PHP

Some of my script are using different encoding, and when I try to combine them, this has becom an issue. But I can't change the encoding they use, instead I want to change the encodig of the result from script A, and use it as parameter in script B.…
qualbeen
  • 1,534
  • 4
  • 16
  • 27
25
votes
2 answers

Using .NET how to convert ISO 8859-1 encoded text files that contain Latin-1 accented characters to UTF-8

I am being sent text files saved in ISO 88591-1 format that contain accented characters from the Latin-1 range (as well as normal ASCII a-z, etc.). How do I convert these files to UTF-8 using C# so that the single-byte accented characters in ISO…
Tim
  • 8,669
  • 31
  • 105
  • 183
21
votes
3 answers

How do I transcode a Javascript string to ISO-8859-1?

I'm writing a Chrome extension that works with a website that uses ISO-8859-1. Just to give some context, what my extension does is making posting in the site's forums quicker by adding a more convenient post form. The value of the textarea where…
21
votes
4 answers

Why does Java's String.getBytes() uses "ISO-8859-1"

from java.lang.StringCoding : String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
Amnon
  • 1,241
  • 3
  • 10
  • 19
18
votes
7 answers

Convert text value in SQL Server from UTF8 to ISO 8859-1

I have a column in SQL Server with utf8 SQL_Latin1_General_CP1_CI_AS encoding. How can I convert and save the text in ISO 8859-1 encoding? I would like to do thing in a query on SQL Server. Any tips? Olá. Gostei do jogo. Quando "baixei" até achei…
bobK
  • 704
  • 2
  • 7
  • 24
18
votes
6 answers

Writing XML files using XmlTextWriter with ISO-8859-1 encoding

I'm having a problem writing Norwegian characters into an XML file using C#. I have a string variable containing some Norwegian text (with letters like æøå). I'm writing the XML using an XmlTextWriter, writing the contents to a MemoryStream like…
henningst
  • 1,664
  • 2
  • 20
  • 30
16
votes
3 answers

Peter Piper piped a Python program - and lost all his unicode characters

I have a Python script that loads a web page using urllib2.urlopen, does some various magic, and spits out the results using print. We then run the program on Windows like so: python program.py > output.htm Here's the problem: The urlopen reads…
Mike Christensen
  • 88,082
  • 50
  • 208
  • 326
1
2 3
52 53