131 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
123
views
WARNING: Unable to encode the output with cp1252 encoding
I am trying to run a powershell script on Microsoft hosted agent "windows-latest" (azure pipeline), It uses below az cli command:
$projects = az devops project list --organization "...
0
votes
0
answers
50
views
tds_fdw FreeTDS change charset from ISO_8859_1 TO CP1252 and that produce error in conversion
There is a problem of conversion from server base and client base when using tds_fdw which automaticaly choose CP1252 from server side and produce an error due to the presence of the character \x81
...
0
votes
1
answer
263
views
Convert file csv with UTF-8 format to ANSI in C#
I have .CSV files with UTF-8 encoding, and I want to convert these files to ANSI format, but my code doesn't work!
static void Main()
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance)...
0
votes
1
answer
85
views
How can I create a ANSI encoded text file in UWP?
I'm currently working on a UWP project and would like to create a text file in ANSI charset (Windows-1252, ISO-8859-1).
The reader of this file only supports ANSI. If the reading side now expects the ...
0
votes
1
answer
56
views
Calculate difference in encoding WITHOUT actually writing to a file?
I have some text, that will be written to 2 files using UTF-8 and 1252 encoding.
Observation when comparing these 2 files:
most text characters will remain the same.
some UTF-8 characters that don't ...
0
votes
2
answers
918
views
write csv with encoding cp1252 with python 3.12
I import data from txt-files that are encoded in utf-8 and from xml files. Data from both formates are transformed and put separately in a pandas dataframe (one for the imported txt-file, one for the ...
0
votes
0
answers
1k
views
Convert Character Between UTF-8 to ANSI (windows 1252) on VSCode?
Does anyone know how to directly convert UTF-8 characters in a file to ANSI (Windows 1252) right on Visual Code without having to use another application?
My problem was that I was using the default ...
-1
votes
1
answer
483
views
Converting Special Characters in UTF-8 file to cp1252 file in Python
We changed to a hosted web based system which produces UTF-8 encoded files, however we have legacy applications that require ANSI cp1252 encoded files. Converting is not a problem however special ...
0
votes
1
answer
339
views
Why might my BufferedWriter output a UTF-8 text file when I'm specifying that the encoding is Cp1252?
I'm working with some files that might be either UTF-8 or ANSI (Cp1252 specifically), and I need to load them, make some edits, and then output the file again with the original encoding. However, I ...
0
votes
0
answers
447
views
How to convert "\x81" to "ü" with codepage 1252 (windows 1252)
I am stuck with a simple task. I want to convert
\x81
into
ü
with the use of codepage 1252 (windows 1252).
My attempt:
data = "\x81"
print(data.encode('cp1252'))
results with an error:
...
0
votes
1
answer
5k
views
Preserving special characters when writing to a CSV - What encoding to use?
I am trying to save the string the United Nations’ Sustainable Development Goals (SDGs) into a csv.
If I use utf-8 as the encoding, the apostrophe in the string gets converted to an ASCII char
import ...
0
votes
0
answers
32
views
Find code page by code point and equivalent character
I have a program, which uses a database to which I have access. This is all on windows and with umlauts and generally horrible.
When I connect to the database with encoding cp1252 I can access the ...
-1
votes
1
answer
137
views
Convert non UTF-8 ASCII literals in otherwise UTF-8 text to their respective character
I have a UTF8 encoded text that has been mangled and contains some 'cp1252' ASCII literals.
I am trying to isolate the literals and convert them one by one, however following code does not work and I ...
0
votes
3
answers
191
views
Get list of files in directory return encode error for persian files name
When I want to execute simple line of code to get a list of files in one drive i have encountered with encoding error
I have a list of files with persian name. when it comes to list these files name ...
0
votes
0
answers
182
views
Convert character Code Set from 1252 to 1256
I've written a code to check the char code set of the input we're providing. Currently, my system supports Character codeset1252 (WE8MSWIN1252). Is there any chance that I can change the database ...