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

Python unicode behaviour in Google App Engine

I got completely confused with gae. I have a script, that does a post request(using urlfetch from Google App Engine api) as a response we get a cp1251 encoded html page. Then I decode it, using .decode('cp1251') and parse with lxml. My code works…
stachern
  • 1
  • 3
0
votes
0 answers

Android HttpPost - Send request in cp1251

I send request with this code: final DefaultHttpClient client = new DefaultHttpClient(); List pairs = new ArrayList(); pairs.add(new BasicNameValuePair("number", pNumber)); final HttpPost httpPost = new…
artem
  • 16,382
  • 34
  • 113
  • 189
0
votes
1 answer

html page displays cyrillic symbols OK, if contains charset=windows-1251, but not utf-8

Well... Html pages and mysql tables contain cyrillic text. For displaying the cyrillic text Барысаў2000 I use on the web-page. For storing that word in MySQL table,…
Haradzieniec
  • 9,086
  • 31
  • 117
  • 212
0
votes
1 answer

spark-xml problem with encoding windows-1251

I have a problem with parsing an XML document in pyspark using spark-xml API (pyspark 2.4.0). I have a file with cyryllic content with the following opening tag: So when I try to open it with some text…
0
votes
0 answers

VSCode C++ Intellisense hover doxygen preview encoding issue

I have C++ files saved with Windows1251 encoding. When I hover over a doxygen-documented function, in the preview window there are question marks only. I can't seem to find a setting for that. Any suggestions? Reproduction First of all, doc…
Egor Chubarov
  • 208
  • 1
  • 13
0
votes
0 answers

Decoding troubles

import disnake from disnake.ext import commands import re import asyncio from disnake import Intents bot = commands.Bot(command_prefix="*", intents=disnake.Intents.all()) player_ku = {} isConsole = False isChat = True isId =…
Fanky
  • 1
  • 1
0
votes
0 answers

UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 4711: character maps to

Soo import disnake from disnake.ext import commands import time from disnake import Intents bot = commands.Bot(command_prefix="*", intents=disnake.Intents.all()) @bot.event async def on_ready(): print(f'{bot.user.name} has connected to…
Fanky
  • 1
  • 1
0
votes
1 answer

Convert text value in SQL Server from GB2312 to WINDOWS-1251

I have a column in SQL Server with GB2312 Chinese_PRC_CI_AS encoding. How can I convert and save the text in WINDOWS-1251 encoding? I would like to do thing in a query on SQL Server. Any tips?
Vicc
  • 1
  • 2
0
votes
2 answers

How to correctly convert cp1251 text to utf-8 in C++? (Linux)

I am trying to convert cp1251 text to utf-8. What I am doing here is creating the buffer of hex numbers of given symbols in cp1251 to later convert those hex symbols to utf-8. The problem is that sometimes the converted string has some trash symbols…
XoDefender
  • 33
  • 6
0
votes
1 answer

How to convert cyrillic characters to ASCII codes with javascript

I really need a way to convert all characters from CP1251 table to ASCII codes from 0 to 255. The only way that I found till now is the charCodeAt() function which only works for codes up to 128. For the upper codes it issues an Unicode number which…
0
votes
1 answer

How to find files when their names can be in different encodings?

I have a bunch of files which names are encoded with cp1251. I also have a bunch of files with utf8 encoded names. I need a way to find them both with Java code. Also, I can't change the names with convmv Linux tool as there are legacy systems that…
akvyalkov
  • 273
  • 5
  • 17
0
votes
1 answer

Blackberry 1251 encoding

Is there a way to convert a byte array to string with the windows-1251 encoding in Blackberry? i tried str = new String(mybyteArr, "Windows-1251"); or str = new String(mybyteArr, "Cp1251"); but I get UnsupportedEncodingException. I am using…
Vame
  • 2,033
  • 2
  • 18
  • 29
0
votes
1 answer

fs.readFileSync("./bank/"+client,'cp1251'); is throwing throw new ERR_INVALID_OPT_VALUE_ENCODING

I'm trying read from a file (The file is in Bulgarian) and with utf 8 it returns nonsense characters so I tried cp1251 but it throws: ERR_INVALID_OPT_VALUE_ENCODING. var str = fs.readFileSync("./bank1/"+client,'cp1251');
0
votes
1 answer

CP1251 Encoding issue in html2pdf

I was download and setup script from:http://www.html2pdf.fr/en It works fine with default encoding, but when I try to generate docs with characters in CP-1251, I got white spaces instead of characters. Also All my files in CP-1251,data in base in…
Nikolay
  • 1
  • 1
  • 1
0
votes
4 answers

How to convert a string from cp1251 to UTF-8 in Python3?

A help needed with a pretty simple Python 3.6 script. First, it downloads an HTML file from an old-fashioned server which uses cp1251 encoding. Then I need to put the file contents into a UTF-8 encoded string. Here is what I'm doing: import…
Ildar Akhmetov
  • 1,331
  • 13
  • 22