Questions tagged [latin1]

Latin1 - ISO-8859-1.

A character set defines the way a sequence of bytes is converted into a sequence of characters. This particular character set is known as Latin-1, or ISO-8859-1. Of the 256 characters in Latin-1, 128 are the characters in the ASCII, the characters that typically appear on a standard U.S. English keyboard (and accompanying nonprinting special characters such as ASCII BEL). The remaining 128 consist of special and accented characters that are used regularly in the Western European languages.

To specify these characters in an HTML document (or on StackExchange), you can enter the character entity (if one is defined) or the numeric entity. For example, to cause Æ to appear in a document, you could enter either Æ or &#198. Note that the case of character entities is significant. Specifying æ causes æ to be displayed.

231 questions
4
votes
1 answer

ISO 8859-1 filename not decoding

I'm extracting files from MIME messages in a python milter and am running across issues with files named as such: =?ISO-8859-1?Q?Certificado=5FZonificaci=F3n=5F2010=2Epdf?= I can't seem to decode this name into UTF. In order to solve a prior…
Larry G. Wapnitsky
  • 1,216
  • 2
  • 16
  • 35
4
votes
2 answers

Why is it direct commented Encoded string not converting to Arabic?

NSString * string = @"االْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ"; const char *c = [string cStringUsingEncoding:NSUTF8StringEncoding]; NSString *newString = [[NSString alloc]initWithCString:c encoding:NSISOLatin1StringEncoding]; …
Hanny
  • 1,322
  • 15
  • 20
4
votes
1 answer

Special characters get lost in MySQL export/import

I'm trying to move a MySQL 3.23.58 database to a different server running 5.5.19. The old one has latin1 encoding specified, and as far as I can tell the underlying data is indeed honestly latin1. I have tried many things, chiefly: exporting from…
Toph
  • 2,561
  • 2
  • 24
  • 28
4
votes
2 answers

String encoding and decoding from possibly latin1 and utf8

I recently stumbled upon a MySQL database that was encoded using Latin1 and was rendering when viewed on a browser question mark symbols. To fix this we changed the encoding of the DB to utf8 and the Collation to utf8_general_ci on all of our…
rroche
  • 1,262
  • 1
  • 13
  • 29
3
votes
2 answers

How do I get an ASCII code from a string in JavaScript?

(Similar questions to this have been asked on StackOverflow, but not exactly this. The nearest is probably "javascript how to convert unicode string to ascii", where there is already the remark "this has to be a dup[licate]". I have read some…
Rhubbarb
  • 4,248
  • 6
  • 36
  • 40
3
votes
1 answer

Pro's and Con's of using HTML Codes vs Special Characters

When building websites for non-english speaking countries you have tons of characters that are out of the scope. For the database I usally encode it on either utf-8 or latin-1. I would like to know if there is any issue with performance, speed…
Saikios
  • 3,623
  • 7
  • 37
  • 51
3
votes
1 answer

How to correct the encoding of characters on a data.frame

I have a data frame make like this: data.names<-data.frame(DATA=c(1:5)) rownames(data.names)<-c("IV\xc1N","JOS\xc9","LUC\xcdA","RAM\xd3N","TO\xd1O") data.names # DATA # IV\xc1N 1 # JOS\xc9 2 # LUC\xcdA 3 # RAM\xd3N 4 # TO\xd1O…
DonDraper
  • 31
  • 1
  • 3
3
votes
1 answer

Uppercase accented characters displayed as “?”

I got a string value from a db table with latin1 as collation. Though, he text contains UTF-8 characters. So I did this in my web server logic (Java) to resolve weird characters : new String(latin1.getBytes(StandardCharsets.ISO_8859_1),…
NinjaFisherman
  • 296
  • 4
  • 15
3
votes
1 answer

How change the default UTF-8 encoding to LATIN1

First time caller. I just want to change string encoding from UTF-8 to LATIN1. I use Xpath to retrieve the data from the web: >library(RCurl) >library(rvest) >library(XML) >library(httr) >library(reshape2) >library(reshape) >response <-…
Aleksandr
  • 1,814
  • 11
  • 19
3
votes
1 answer

'latin-1' codec can't encode character u'\u2014' in position 23: ordinal not in range(256)

I am loading data into a pandas dataframe from an excel workbook and am attempting to push it to a database when I get the above error. I thought at first the collation of the database was at issue which I changed to utf8_bin Next I checked the…
lathomas64
  • 1,612
  • 5
  • 21
  • 47
3
votes
2 answers

Converting utf-8 to latin-1 in Python

I want to do this: Take the bytes of this utf-8 string: 访视频 Encode those bytes in latin-1 and print the result: 访视频 How do I do this in Python? # -*- coding: utf-8 s = u'访视频'.encode('latin-1') Causes this exception: s =…
OregonTrail
  • 8,594
  • 7
  • 43
  • 58
3
votes
3 answers

Find out character encoding of straße

I'm struggling with the encoding of the content of an external interface. In the MySQL database the collation is latin1_swedish_ci. Also the collation of the field ist latin1_swedish_ci. The php script is encoded in UTF-8 and the output in the…
testing
  • 19,681
  • 50
  • 236
  • 417
3
votes
1 answer

Convert latin1 to UTF8 in C#

Possible Duplicate: Convert Latin 1 encoded UTF8 to Unicode I want to convert latin1 (ISO-8859-1) to UTF8 in C#. What is the best way to do this? My string is "Công ty TNHH TM và DL Việt Hương".
hainv
  • 97
  • 2
  • 2
  • 9
3
votes
2 answers

What happens if I connect to a utf8 MySQL DB table using latin1?

Interesting question... if I have a MySQL table with CHARSET=utf8, and I open a connection with latin1 encoding, what happens? I tried this, and even characters such as ß and æ could be stored and retrieved properly. Those characters are represented…
dordal
  • 613
  • 6
  • 8
3
votes
3 answers

Proper handing of UTF-8 in Perl

I have been given a file, (probably) encoded in Latin-1 (ISO 8859-1), and there are some conversions and data mining to be done with it. The output is supposed to be in UTF-8, and I have tried about anything I could find about encoding conversion in…
Lanbo
  • 15,118
  • 16
  • 70
  • 147