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
169
votes
2 answers

Differences between utf8 and latin1

what is the difference between utf8 and latin1?
binbash
  • 1,699
  • 2
  • 11
  • 3
37
votes
5 answers

MySQL Workbench charset

Does there exist any way to change the MySQL Workbench charset? My schema uses UTF-8 and when I view the table data (saved as UTF-8) or add data manually, it appears with charset errors, probably MySQL Workbench uses LATIN1.
Math
  • 371
  • 1
  • 3
  • 4
32
votes
2 answers

Postgres issue encoding "UTF8" has no equivalent in encoding "LATIN1"

Our postgres production database server has a database called crd_production which is born out of the template1 template database. Incidentally, on an Ubuntu 12.04 box, the default encoding of the template1 and template0 databases on initial…
paddle42380
  • 6,921
  • 7
  • 32
  • 40
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
20
votes
4 answers

How to detect UTF-8 characters in a Latin1 encoded column - MySQL

I am about to undertake the tedious and gotcha-laden task of converting a database from Latin1 to UTF-8. At this point I simply want to check what sort of data I have stored in my tables, as that will determine what approach I should use to convert…
dinie
  • 536
  • 1
  • 4
  • 12
19
votes
2 answers

UnicodeEncodeError:'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)

i am a newer in python.Today when I write some search function I met an error.well, I use sqlalchemy orm to do that, in my function,I input a chinese word as the key word.The html page give me an UnicodeEncodeError at /user/search:'latin-1' codec…
jiank
  • 305
  • 1
  • 4
  • 8
18
votes
1 answer

How can I detect non-western characters?

I want to disallow certain UTF-8 input (server-side), e.g. eastern languages, where example input might be " 伊 ". However, I do want to continue supporting other latin or "latin-like" characters, such as the welsh ŵ and ŷ, so checking against…
HoboBen
  • 2,900
  • 4
  • 21
  • 26
16
votes
2 answers

Converting mysql tables from latin1 to utf8

I'm trying to convert some mysql tables from latin1 to utf8. I'm using the following command, which seems to mostly work. ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; However, on one table I get an error about a…
Brent Baisley
  • 12,641
  • 2
  • 26
  • 39
14
votes
3 answers

Python converting latin1 to UTF8

In Python 2.7, how do you convert a latin1 string to UTF-8. For example, I'm trying to convert é to utf-8. >>> "é" '\xe9' >>> u"é" u'\xe9' >>> u"é".encode('utf-8') '\xc3\xa9' >>> print u"é".encode('utf-8') é The letter is é which is LATIN SMALL…
Eugene
  • 10,957
  • 20
  • 69
  • 97
12
votes
1 answer

How to make a Rails Migration be utf-8 instead of my default latin1

I just checked my MySQL tables and I have default set as latin1. Is that generally the default? How can I make it explicit for all my tables that I want the database to be utf-8? I know there is a db configuration that can change the default, but…
GeekedOut
  • 16,905
  • 37
  • 107
  • 185
12
votes
8 answers

When to use utf-8 and when to use latin1 in MySQL?

I know that MySQL has default of latin1 encoding and apparently it takes 1 byte to store a character in latin1 and 3 bytes to store a character in utf-8 - is that correct? I am working on a site that I hope will be used globally. Do I absolutely…
Genadinik
  • 18,153
  • 63
  • 185
  • 284
10
votes
2 answers

Python with non-latin-1 PYTHONHOME path

In my case I embedded Python into my application. When the path of my application contains a non-latin-1 character Py_Initialize calls exit(1) internally (more information later). So I checked if can reproduce this with the standard interpreter…
HelloWorld
  • 2,392
  • 3
  • 31
  • 68
9
votes
3 answers

Converting a string from utf8 to latin1 in NodeJS

I'm using a Latin1 encoded DB and can't change it to UTF-8 meaning that I run into issues with certain application data. I'm using Tesseract to OCR a document (tesseract encodes in UTF-8) and tried to use iconv-lite; however, it creates a buffer and…
antjanus
  • 987
  • 3
  • 15
  • 30
8
votes
3 answers

Configuring Locales on Linux for PostgreSQL

I'm having trouble getting a particular database set up and running. I'm trying to restore a postgreSQL dump I got from somebody else. I've tried a few methods to no avail. Straight from pg_restore pg_restore -C -d postgres --exit-on-error…
The_Denominater
  • 985
  • 4
  • 9
  • 20
8
votes
1 answer

How to read in ISO 8859-1 (Latin-1) encoded text in Perl

So I'm trying to write a perl script to read in a file encoded in Latin-1. For some reason, this just isn't working out. When I try to do a simple search for a character that I know is in the file (it's in the first line), nothing shows up. I'm…
John Montgomery
  • 314
  • 5
  • 13
1
2 3
15 16