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
1 answer

Confused about conversion between windows-1252 and UTF-8 encoding

I have a legacy database that claims to have collation set to windows-1252 and is storing a text field's contents as I’d When it is displayed in a legacy web-app it shows as I’d in the browser. The browser reports a page encoding of UTF-8. I…
Ben
  • 1,321
  • 15
  • 30
0
votes
1 answer

Java Windows-1252 wrong chars

I'm coding a RSA algorithm to encrypt a string to send to a VisualBasic webservice. Unfortunatelly the VB RSAcryptoserviceprovider always gives me an exception "Bad data" and i this the problem is the encoding. The VisualBasic code receives the…
0
votes
1 answer

Converted word document (from Windows-1252 to UTF-8) not displaying characters correctly

I have a Windows-1252 word document that I want to convert to UTF-8. I need to do this to correctly convert the doc file to a pdf. This is how I currently do it: Path source = Paths.get("source.doc"); Path temp = Paths.get("temp.doc"); try…
bortdc
  • 931
  • 9
  • 11
0
votes
1 answer

Need to get an XML from server encoded in windows-1252 for my iOS application

I have an iOS application which is download from server an XML file encoded in Windows 1252. I am using the following code to save it to my document folder : NSString *path = @"http://server/file.xml"; NSURL *URL = [NSURL URLWithString:[path…
Xavier
  • 270
  • 1
  • 7
  • 17
0
votes
1 answer

Replacing some characters in a NSString

I have this XML file encoded in windows-1252 and I haven't found any method to get a proper UTF-8 encoding from this file so far. It's a file containing a lot of accented characters that I need to display. What I want to do, is to replace any…
Xavier
  • 270
  • 1
  • 7
  • 17
0
votes
0 answers

TSQL select varchar as windows1252 instead of utf8

How to query Sql server getting strings as windows1252 charset instead of the table/connection default utf8?
Tobia
  • 9,165
  • 28
  • 114
  • 219
0
votes
2 answers

Decoding strings on PHP: Data treats UTF-8 Bytes as Windows-1252

I am getting data from a web API which has a strange encoding. I am using PHP and can't seem to decode input strings. I seem to be having this problem, which explains what's going but doesn't really help me figure out how to fix it. Can anyone…
vinsanity555
  • 241
  • 1
  • 11
0
votes
1 answer

How to read WCP-1252 characters in C++?

I did some Googling around, but couldn't find a clear answer (not using the correct terminology perhaps?) Anyway, I have some text files in ANSI format (WCP-1252) whose characters I want to process in a C++ program, but the thing is I don't know how…
Ali250
  • 652
  • 1
  • 5
  • 19
0
votes
3 answers

PHP Encoding Conversion to Windows-1252 whilst keeping UTF-8 Compatibility

I need to convert uploaded filenames with an unknown encoding to Windows-1252 whilst also keeping UTF-8 compatibility. As I pass on those files to a controller (on which I don't have any influence), the files have to be Windows-1252 encoded. This…
Liquinaut
  • 3,759
  • 1
  • 21
  • 17
0
votes
1 answer

Com wrapper and code pages

I have a legacy Delphi COM library that accepts an ANSI string (code page 1252) as parameter. The generated .net wrapper accepts a string for this parameter. Passing in a regular string however doesn't end well. If passed in the '°' character a…
Boris Callens
  • 90,659
  • 85
  • 207
  • 305
-1
votes
1 answer

Encode while preserving undefined characters

Here I got a string from outside db ãƒ\u008F, and I want to convert it back to unicode character. I know the db is using windows-1252 encoding, so the actual character should be \xe3\x83\x8f, which is ハ in utf-8 encoding. Here are the things I've…
sbs
  • 4,102
  • 5
  • 40
  • 54
-1
votes
1 answer

PHP: How to convert string to WINDOWS-1252 entities/characters?

I have the following string: LONDON — Britain’s unemployment rate held steady in the three months through January, reinforcing the Bank of England’s case for keeping interest rates at a record low. If I use something like htmlentities I get the…
bigmike7801
  • 3,908
  • 9
  • 49
  • 77
-2
votes
1 answer

Checking webpage for results with python and beautifulsoup

I need to check a webpage search results and compare them to user input. ui = raw_input() #for example "Niels Bohr" link = "http://www.enciklopedija.hr/Trazi.aspx?t=profesor,%20gdje&s=90&k=10" stranica=urllib.urlopen(link) soup =…
-4
votes
1 answer

Java wrong decimal for extended ascii windows-1252

how can I get the correct decimal for the extended ascii based on windows-1252? Found few symbol will return as unicode instead of ascii number such as below: symbol: ’ expected: 146 return: 8217 symbol: ” expected: 148 return: 8221
ctlee
  • 1
1 2 3
11
12