Questions tagged [windows-1252]

Windows-1252 or CP-1252 is a character encoding of the Latin alphabet. It is the default character encoding used by text editors in the English version of Microsoft Windows. It defines 27 characters not present in the related ISO-8859-1 encoding. Microsoft recommends developers use a Unicode character encoding instead.

The Windows-1252 code page is used by the Windows operating system to display a number of Latin-based languages. This character set mimics the ISO 8859-1 (Latin-1) character set, except that it adds 27 characters for bytes 128-159 which are undefined in ISO 8859-1.

The languages represented by CP-1252 include English, Spanish, and various Germanic/Scandinavian languages.

References

180 questions
0
votes
0 answers

NumberFormatter output is wrong on webserver, not on another one

Context: we produce CSV and PDF files containing numbers formatted using French format (thousand separator is a no-break space). When reading the CSV or PDF files, when downloaded from production server, we get a ? character in place of the no-break…
Vincent Mimoun-Prat
  • 28,208
  • 16
  • 81
  • 124
0
votes
1 answer

cypress runner ignoring charset="windows-1252" html tag

I'm testing a page which is windows-1252 encoded, it has the following meta tags in the html: Meta-SSC But cypress runner won't…
opensas
  • 60,462
  • 79
  • 252
  • 386
0
votes
0 answers

cURL input to DOMDocument UTF-8

I am reading in the HTML from a URL and even though it is labelled as UTF-8 in the browser I have to iconv Windows-1252//IGNORE to get the correct result. $ch = curl_init(); $timeout = 10; curl_setopt($ch, CURLOPT_URL, $url); …
0
votes
0 answers

HTML file encoding issue (Chinese)

I have a HTML file that contains some records shown in a table that somehow got encoded in the wrong way. A large part of the file is correct and shows the content as expect but some parts of the file seem to be encoded in the wrong way. Actually…
0
votes
1 answer

Different codepoints for same character in MacOS and Windows

I have a small piece of code in which I am checking the codepoint for the the character Ü. Locale lc =…
pradystar
  • 15
  • 4
0
votes
1 answer

PHP iconv from utf-8 to windows-1252 with no special characters

I'm trying to encode a file contents like this: $f_file = fopen("dreams.txt", "w"); $string = "Los sueños se cumplen."; $string_encoded = iconv( mb_detect_encoding( $string ), 'Windows-1252//TRANSLIT', $string ); fwrite($f_file,…
0
votes
2 answers

Android UTF-8 encoding not working?

I am working with a CSV file right now. In my program i am using an OutputStreamWriter to write data the csv file. OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut, Charset.forName("UTF-8").newEncoder()); I tried printing out the…
Martin Lund
  • 1,159
  • 9
  • 17
0
votes
1 answer

What's the difference between encoding and charset? cp1252 and windows1252

What's the difference between encoding charset cp1252 and windows1252? or are they the same?
Nathan Stanford
  • 1,336
  • 3
  • 23
  • 37
0
votes
1 answer

MySQL connector NET 6.7.9 - Fix for "common" problems with WinRT assembly

I was working on Windows Universal App in which I'm using MySQL connector NET 6.7.9 to communicate with database. The WinRT assembly caused me a lot of pain. A to right now those were major problem: How to fix SSL exception while opening…
MrJW
  • 165
  • 2
  • 9
0
votes
1 answer

Python Encoding person names

I'm loading data into a postgresdwh encoded at utf-8 which includes personal information - including first name, last name and addresses. These values can have German characters such as umlauts as well as French characters such as é, â, à etc. Data…
OAK
  • 2,994
  • 9
  • 36
  • 49
0
votes
3 answers

Detecting encoding conversion problems

The majority of content on my company's website starts life as a Word document (Windows-1252 encoded) and is eventually copied-and-pasted into our UTF-8-encoded content management system. The conversion usually chokes on a few characters (special…
Chris Van Opstal
  • 36,423
  • 9
  • 73
  • 90
0
votes
0 answers

java encoding file in windows-1252 appears Big5 in notepad++

I'm facing a problem when I write files with the encoding "windows-1252" : I don't know exactly when but sometimes, the files are encoded in Big5 (Chenese). I control the encoding in notepad++ For exampe, the string…
0
votes
2 answers

XMLReader -- Getting problem with utf characters

I am parsing a huge xml file and encoding of file is to be said < ? xml version="1.0" encoding="ISO-8859-1" ?>**bold The db encoding is utf8 and I am running this query before anything is saved to db $sql='SET NAMES "utf8" COLLATE…
Gajendra Bang
  • 3,593
  • 1
  • 27
  • 32
0
votes
1 answer

UNICODE doesn't work -> "????" (visual c++ 2015)

I want to use UNICODE in visual C++ 2015 but it doesn't work so I tried a simple tutorial. Here is the code: #undef UNICODE #define UNICODE #undef STRICT #define STRICT #include int main() { DWORD const infoboxOptions = MB_OK |…
0
votes
3 answers

Convert char to wchar_t using standard library?

I have a function that expects a wchar_t array as a parameter.I don't know of a standard library function to make a conversion from char to wchar_t so I wrote a quick dirty function, but I want a reliable solution free from bugs and undefined…
user6274708