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

Converting string from UTF-8 to ANSI and displaying it as UTF-8

I want to mimic with Java one thing I can do with Notepad++. TEXT_2 = convert(TEXT_1) // where: TEXT_2 = "Български", TEXT_1 = "БългарÑки" How to do it with Notepad++ Setting the starting point... Open Notepad++ and click: Encoding /…
Angel
  • 611
  • 2
  • 10
  • 18
0
votes
0 answers

Finding the encoding opening csv file in python

I have problems understanding how to detect the proper encoding of a csv file. I created a small csv file as a sample for testing, cutting and pasting some rows from one of the original files I want to process, and saved that information in my local…
Pablo
  • 123
  • 1
  • 1
  • 8
0
votes
0 answers

java - save object to file using BufferedWriter | parsing String to ArrayList

I have the following code to save an Object to file, the problem is I want to save it as CP1252 and as an object, But it only lets me save as String BufferedWriter output = new BufferedWriter(new OutputStreamWriter(new…
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

Reading from UTF-8 formatted pdf file and writing it to a writer in cp1252 format

I am trying to read from a pdf file using file streams and I want to write it to a writer in cp1252 encodeded format. Following is the code: byte buf[] = new byte[8192]; InputStream is = new FileInputStream(f); ByteArrayOutputStream oos = new…
0
votes
0 answers

Python 3 encode error

Recently I encountered the following problem: I have an array of strings: name in ['Mueller', 'Meier', 'Schulze', 'Schmidt'] I face problems with its encoding in Python 3: name.encode('cp1252') Here is the full snippet: target_name =…
0
votes
1 answer

Unicode entities displayed as CP1252

I've decided to write myself a little script for a Unicode reference, since my favourite on-line Unicode look-up site has become buggy and full of ads. It's been an enjoyable project so far. I've noticed, however, that some characters are displayed…
0
votes
1 answer

Read data using ODBC ADO.NET from Db2 Codepage 1252 - Euro (€) Symbol is not retrived correctly

In VS 2005 C#, While inserting Euro (€) Symbol into Db2 table, It is storing values correctectly. DISABLEUNICODE=1 parameter helped to store this correctly. But when we try to read from the table, it is giving junk char as below. "Spec GS …
0
votes
1 answer

How can I convert byte CP-1252 to byte UTF-8 in java

I have already tried convert byte cp1252 to byte utf8 but all is in vain. For example: I have byte[] 0xB5(cp1252) and I want convert to byte[] 0xC3, 0xA0(utf8). I want to like this: µ --> à. My code but it is not working: public void convert(){ …
Sơn Đàm
  • 29
  • 1
  • 6
0
votes
1 answer

Drawing bitmap fonts from cp-1252 characters

I'm developping a prototype application to generate bitmap fonts giving TTF. I'm using Qt library which I'm using for years. However, I realized I've never been involved into "characters" issues before. What I'm trying is quiet simple: I need to…
Zyend
  • 572
  • 1
  • 4
  • 24
0
votes
1 answer

convert UTF-8 to CP1252 in ubuntu with PHP or bash shell

I have a question about converting UTF-8 to CP1252 in Ubuntu with PHP or SHELL. Background : Converting a csv file from UTF-8 to CP1252 in Ubuntu with PHP or SHELL, copy file from Ubuntu to Windows, open file with nodepad++. Environment : Ubuntu…
cupidcb
  • 97
  • 4
  • 11
0
votes
1 answer

Can source code files with different encoding coexist in (the same) Java (project in Eclipse)?

I know Java uses UTF-16 internally and expects .properties files to be in ISO-8859-1 by default. I'm currently working on a project that was written in Eclipse, whose default encoding on our systems is cp-1252. I'm thinking utf-8 would be a much…
Christian
  • 6,070
  • 11
  • 53
  • 103
0
votes
1 answer

allow UTF-8 encoded filenames on (file-)webserver?

I am hosting a small fileserver, where users can upload documents from all around the world. Due to problems in encoding (see otherquestion), I am asking myself if I should disallow users to upload (and on the other hand download) files not…
Niko
  • 1,054
  • 5
  • 25
  • 52
0
votes
2 answers

How do I create a string of random, non-standard characters in PHP?

I want to create a string of non-standard characters in PHP, such as characters 128-255, and then encode said string as CP1252:
NobleUplift
  • 5,631
  • 8
  • 45
  • 87
0
votes
1 answer

How to convert UTF8 to cp1252 correctly (1.8.7)

I am not sure how to tell Iconv to transcode my strings to readable output. Example: I am converting a "LATIN CAPITAL LETTER S WITH CARON" U+0160, rendered as Š. Iconv.conv('cp1252', 'UTF8', 'Š') however returns "\212" I would expect it to return…
kostja
  • 60,521
  • 48
  • 179
  • 224
1 2 3
8
9