Questions tagged [windows-1252]

Windows-1252 or CP-1252 is a character encoding of the Latin alphabet. It is the default character encoding used by text editors in the English version of Microsoft Windows. It defines 27 characters not present in the related ISO-8859-1 encoding. Microsoft recommends developers use a Unicode character encoding instead.

The Windows-1252 code page 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 that it adds 27 characters for bytes 128-159 which are undefined in ISO 8859-1.

The languages represented by CP-1252 include English, Spanish, and various Germanic/Scandinavian languages.

References

180 questions
3
votes
1 answer

Parse windows-1252 param in rails action

My API is receiving a call that contains windows-1252 encoded data in the POST body. In rails 6.0.3, this apparently worked. But rails 6.1.1 throws ActionController::BadRequest (Invalid request parameters: Invalid encoding for parameter. Edit: I can…
Kjell
  • 492
  • 1
  • 7
  • 15
3
votes
1 answer

PHP: convert characters to their (decimal) numeric representation (in a string)

we are working on a project, where we have to imitate some export output of an old legacy system. These exports are text based and encoded in the WINDOWS-1252 encoding, where special characters should be encoded in their decimal/numeric…
Fabian
  • 53
  • 1
  • 3
3
votes
1 answer

Decoding a combination of windows-1252 and quoted printable HTML

I have been given a piece of text representing HTML e.g.: \r\n\r\n\r\n