Questions tagged [cp1251]

Windows-1251 (a.k.a. code page CP1251) is a popular 8-bit character encoding, designed to cover languages that use the Cyrillic script such as Russian, Bulgarian, Serbian Cyrillic and other languages. It is the most widely used for encoding the Bulgarian, Serbian and Macedonian languages. In modern applications, Unicode is a preferred character set.

Windows-1251 or code page CP1251 is a popular 8-bit character encoding, designed to cover languages that use the Cyrillic script such as Russian, Bulgarian, Serbian Cyrillic and other languages. It is the most widely used for encoding the Bulgarian, Serbian and Macedonian languages. In modern applications, Unicode is a preferred character set.

Source and more information: Windows-1251 on the English Wikipedia

76 questions
0
votes
0 answers

Charset windows-1251 in Alamofire request?

Help, server that I use work only with charset windows-1251. But Alamofire use utf8. I try to change headers, but it's not work for me. How use Alamofire with another charset, not utf8?
Qukish
  • 11
  • 2
0
votes
0 answers

Convert mongo values from one encoding to another

I put 250_000 records to mongodb with java driver, but forgot to set encoding explicitly, so after linux on my windows machine system encoding changed to cp1251 and I have many records with values like Внедорожник 5 РґРІ. I have a…
Ivan Ivanov
  • 2,076
  • 16
  • 33
0
votes
2 answers

Python (requests) encoding trouble (UTF-8 - CP1251)

I trying to get this kind of URL http://example.com/?param=%DD%CC%C0-15 with requests python extension like this: group = "ЭМА-15".encode('cp1251') r = requests.get('http://example.com/?param=' + group) r.encoding = "cp1251" (because site works…
Vlad Markushin
  • 443
  • 1
  • 6
  • 24
0
votes
1 answer

Yii2, MS-SQL: Not stored value (Cyrillic) in a field of type text

There is a field in MS-SQL, windows-1251, type text. Using activeRecord is added to the value of the field "address" (Cyrillic), formed a query: INSERT INTO [Orders] [Address]) VALUES (0xc8ecff20d4e0ece8ebe8ff20cef2f7e5f1f2e2ee) You receive the…
Bombadile
  • 11
  • 3
0
votes
0 answers

Java Swing app displays characters in cp1252

I'm trying to run some swing app. Language constants are in a bundle in the *.properties files in windows-1251 encoding. But when i run the app, it displays text in labels in CP1252. I've tried to compile the app with -encoding option, and run it…
WebComer
  • 1,131
  • 2
  • 19
  • 31
0
votes
1 answer

Why does a CP-1252 ellipsis show up as u with ring above (ů) on some browsers

For some reason, on some browsers, a CP-1252 ellipsis (0x85) is showing up as ů. I believe the server is claiming the page will be in UTF-8 (don't ask me why a UTF-8 server is serving CP-1252, that is out of scope). I would understand throwing a…
Chas. Owens
  • 64,182
  • 22
  • 135
  • 226
0
votes
1 answer

How to fix UnicodeDecodeError: 'utf8' decode byte 0xc0 read in sql file

This is tx.sql DECLARE @Cnt INT, @ParticipantID UNIQUEIDENTIFIER SELECT ParticipantID INTO #ids FROM dbo.rbd_Participants /* sun */ WHERE surname='Пупкин' This is python script with open('tx.sql', 'r') as f: script =…
voice
  • 830
  • 10
  • 17
0
votes
1 answer

Changing encoding python 3

Have a default encoding of 'cp1251'-how can it be changed to UTF-8 by default in Python3? Because the function sys.setdefaultencoding() is not working
Keithx
  • 2,994
  • 15
  • 42
  • 71
0
votes
2 answers

Decoding Cyrillic in Python - character maps to

I receive a server response, bytes: \xd0\xa0\xd1\x83\xd0\xb1\xd0\xbb\xd0\xb8 \xd0\xa0\xd0\xa4 \xd0\x9a\xd0\xa6\xd0\x91 This is for sure Cyrillic, but I'm not sure which encoding. Every attempt to decode it in Python fails: b =…
Artem
  • 13
  • 5
0
votes
1 answer

Pattern code to guess the textfile codepage in perl?

Sorry for my noob's question, but I can't make the next script work. It's a useful peace of code, but I did not find the similar working one in net. use Encode; use Encode::Guess; open (my $fhr, "<", "$folder\\$_") or die "Could not open file…
Kirill Golikov
  • 1,354
  • 1
  • 13
  • 27
0
votes
2 answers

Troubles with XML encoding in Java

I have a problem with XML encoding. When i created XML on localhost with cp1251 encoding all cool But when i deploy my module on server, xml file have incorrect symbols like "ФайлПФР" StringWriter writer = new StringWriter(); StreamResult…
user3114474
  • 75
  • 1
  • 1
  • 9
0
votes
0 answers

Calculating NON UTF8 character code on JS

There is a method called charCodeAt(position). But according to its documentation (and the console) it will return UTF8 code of a given character. But I'd like to build a project basing on a single byte encoding (Windows 1251 in my case -…
Roman Matveev
  • 563
  • 1
  • 6
  • 22
0
votes
1 answer

Iconv byte length

I am using iconv to convert string from CP1251 to UTF-8 Problem is that string length before conversion is 4 bytes, after 8. After converting i send message to Apple servers, where is length is limited. How I can get conversion and keep the same…
nik1004
  • 327
  • 3
  • 11
0
votes
1 answer

scrapy misses xpaths where xpath contains cp1251

Values response: { 'articul': [u'testetete'], 'diametr': ['Empty'], 'image': [u'/foto/11.20.jpg'], 'name': [u'Трололололо'], 'url': ['http://test.ru/goods/detali.html?product_id=20'] } where other fields?
John Doe
  • 149
  • 1
  • 10
0
votes
1 answer

xml to php and parse encoding error

I am parsing xml file from url(in code below), using file_get_contents() function, and simpleXML, to insert data into the table, i did well, but i have problem with encoding(russian words) i get this ->Черногория; file and database…
Petro Popelyshko
  • 1,353
  • 1
  • 15
  • 38