Questions tagged [cp1252]

CP-1252 or Windows-1252 is a character encoding of the Latin alphabet.

The windows 1252 codepage 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 it varies with the characters in positions in the range of 128-159.

The set of languages represented by CP1252 include English, Spanish, and various Germanic/Scandinavian languages.

125 questions
1
vote
1 answer

changing pdf text encoding

I have a PDF document (that is my schoolbook) and the problem is that although the text is printed normally, it is copied in the form of some random glyphs. I found, that it is because of text being encoded on cp1251 but trying to be decoded as…
lazba
  • 129
  • 9
1
vote
1 answer

Which encoding should Python open function use?

I'm getting an exception when reading a file that contains a RIGHT DOUBLE QUOTATION MARK Unicode symbol. It is encoded in UTF-8 (0xE2 0x80 0x9D). The minimal example: import sys print(sys.getdefaultencoding()) f = open("input.txt",…
Dmitry Kuzminov
  • 6,180
  • 6
  • 18
  • 40
1
vote
1 answer

How to create a directory with different language name in java?

I am trying to create a directory with different language name in java, but the directory is not generated and appearing as "?????" in log. { String strtobyte = "对不起拜托"; byte[] b = strtobyte.getBytes(("Windows-1252")); …
1
vote
0 answers

Pandas can not write csv with CP1252 encoding

I am trying to import a csv file in https://shop.deutschepost.de/. A demo csv file is given and both has the same encoding. But in my csv some character (German umlaut) is broken. The code I used to find my csv's encoding file =…
1
vote
1 answer

Python3 different behaviour between latin-1 and cp1252 when decoding unmapped characters

I'm trying to read in Python3 a text file specifying encoding cp1252 which has unmapped characters (for instance byte 0x8d). with open(inputfilename, mode='r', encoding='cp1252') as inputfile: print(inputfile.readlines()) I obviously get the…
Andrea Baldini
  • 1,027
  • 1
  • 6
  • 17
1
vote
1 answer

Write "ANSI" encoded file to disk

I am supposed to create an export file using groovy in ANSI format. When i write the file to disk and open it in "Notepad++" or nano the special characters such as "äüö" are not displayed properly. Notepad++ displays "Windows-1255" as encoding. I…
Jens Kisters
  • 117
  • 2
  • 10
1
vote
1 answer

Decode Inputsteam with CP1252 encoding in java

The Inputstream that i receive from a post request through ExtJS is in CP1252 encoding. How do i decode the Inputsteam so that i can use the json string and convert it to the appropriate java bean. I found out the encoding by using the…
Varun Achar
  • 14,781
  • 7
  • 57
  • 74
1
vote
0 answers

Migrating a PostgreSQL database to a MySQL database

I realize that this looks like a duplicate at first glance, but hear me out - I'm trying to use MySQL Workbench to copy data from a remote PostgreSQL server to my MySQL server. I'm having problems with the character set for some reason. The schema…
x n
  • 71
  • 3
1
vote
1 answer

How to convert cp1252 to UTF-8 when export csv file using python

I have Unicode error when I tried to export the CSV file (web-scraping, I'm using Beautifulsoup and imported both CSV and Beautifulsoup). The code is used by Mac Linux which quite supports the UTF-8 but I'm using Windows. The error shows as >…
Meekao
  • 35
  • 1
  • 9
1
vote
1 answer

RTF CP1252 to Text UTF-8

Here is a file that I need to convert to plain text in MAC OSX zshell. http://narod.ru/disk/6431540001/Test_rtf.rtf.html I've tried unrtf, rtf2txt, rtf2html = no result. They can't convert ru_cp1252. Also I've tried unrtf file.rtf | iconv -f cp1252…
iRoller
  • 23
  • 6
1
vote
1 answer

Python TypeError: encoding with 'cp1252' codec failed

I get this error when I run any installation command: Complete output from command python setup.py egg_info: TypeError: 'tuple' object is not callable The above exception was the direct cause of the following exception: Traceback (most…
M1rwen
  • 1,742
  • 3
  • 16
  • 19
1
vote
2 answers

Url is encoded in UTF-8 but Python is trying to read it as cp1256

I am trying to run this code: import requests resp = requests.get('https://www.binance.com/assetWithdraw/getAllAsset.html') print(resp.json()) But I get this ouput in my command prompt: UnicodeEncodeError: 'charmap' codec can't encode character…
PurexedPose
  • 53
  • 1
  • 5
1
vote
1 answer

blob with conversion to 8bit cp1251 or cp1252

I need a solution with encoding utf to 8-bit cp1251 or cp1252 using blob I managed to change the https://github.com/b4stien/js-csv-encoding including windows 1251, but there are insoluble problems: Unfortunately noscript does not allow loading…
nnovic
  • 11
  • 1
  • 5
1
vote
2 answers

How to determine whether utf-8 or cp1252 encoding?

Is there way in perl to determine which of utf-8 or cp1252 the encoding of a string is?
CJ7
  • 22,579
  • 65
  • 193
  • 321
1
vote
1 answer

Cannot convert csv from utf-8 to ansi with csv writer python 2.6

I'm trying to do load a .csv file with utf-8 text format and write it in a cp1252(ansi) format with pipe delimiters. The following code works in Python 3.6 but I need it to work in Python 2.6. However, the 'open' function does not allow an encoding…
Arjan Groen
  • 604
  • 8
  • 16
1 2 3
8 9