windows-1252

Windows C API for UTF8 to 1252

爱⌒轻易说出口 提交于 2019-12-11 01:40:44
问题 I'm familiar with WideCharToMultiByte and MultiByteToWideChar conversions and could use these to do something like: UTF8 -> UTF16 -> 1252 I know that iconv will do what I need, but does anybody know of any MS libs that will allow this in a single call? I should probably just pull in the iconv library, but am feeling lazy. Thanks 回答1: Windows 1252 is mostly equivalent to latin-1, aka ISO-8859-1: Windows-1252 just has some additional characters allocated in the latin-1 reserved range 128-159.

Setting the charset of html response content to 1252

隐身守侯 提交于 2019-12-10 20:37:02
问题 I'm trying to send some data encoded in Windows 1252 (it's a CSV file) in an HTTP response, but somewhere along the way it's getting re-encoded to UTF-8 (no BOM). How can I make sure that the data stays in the correct encoding? var sb = new StringBuilder(); // Build the file from windows-1252 strings in the sb... HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.ClearContent(); HttpContext.Current.Response.AddHeader("content

Cygwin terminal not displaying certain characters?

不想你离开。 提交于 2019-12-10 19:47:12
问题 I am running a stock Cygwin install, with the wget package added. If I run a command wget -qO- tetristv.com/zapni.tv.php I get this; notice the incorrect display of characters session=OTA5Mjc0ODU5OA==&stream=play</a></b><br>#EXTINF:0,▒T 1<br><b><a href="http://212.80.69.19/stream/vlc.php?id=39&session=OTA5Mjc0ODU5OA==& stream=play" target="_blank" rel="nofollow">http://212.80.69.19/stream /vlc.php?id=39&session=OTA5Mjc0ODU5OA==&stream=play</a></b><br>#EXTINF:0,▒T 2<br><b><a href="http://212

IntelliJ JavaDoc - error - cannot read Input length = 1

时间秒杀一切 提交于 2019-12-10 18:10:02
问题 I know there are plenty of questions about this problem, but no one of the solved it for me! I'm using the Community Edition of IntelliJ and I tried to run JavaDoc through the IDE. Everytime and it doesn't matter fo which file, I run JavaDoc I got the following output: javadoc: error - cannot read Input length = 1 I already figured out, that it might be an encoding problem... I'm working on a Windows 10 maschine. I already tried the following: JavaDoc argfile encoding error Start the terminal

Why am I able to use a character that's not part of a charset (windows-1252)?

走远了吗. 提交于 2019-12-09 23:58:11
问题 I'm looking for a little help in understanding how charsets work. This question is a continuation from Anything wrong with using windows-1252 instead of UTF-8 I have a test ColdFusion site using... <CFHEADER NAME="Content-Type" value="text/html; charset=windows-1252"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> and a test Oracle DB using... NLS_CHARACTERSET: WE8MSWIN1252 NLS_NCHAR_CHARACTERSET: AL16UTF16 According to the windows-1252 charset there is no square

Huge string replace in JavaScript?

我的未来我决定 提交于 2019-12-07 15:02:24
问题 I've got a small JavaScript application that will parse files the user drops into the browser. Recently I've discovered an issue with some non-english characters. The file types that are dropped on here are using the Windows-1252 character set, so characters such as ñ , are actually coming through as ñ and I must convert them all to the proper characters. For example, I get Señor which should be Señor in Spanish. I've found an extremely useful website with the collection of the characters,

Characters with ASCII > 128 are not correctly read in Javascript

試著忘記壹切 提交于 2019-12-06 06:55:38
问题 I have a HTML that includes a Javascript file. This script contains a special character, ASCII 152. When I try to display the charCodeAt, I get different results, but never the right one. Could you please advice? Thanks TEST.HTML <script type="text/javascript" charset=SEE BELOW src="test.js"> </script> TEST.JS file with ANSI encoding function d(a) { a=(a+"").split(""); alert(a[1].charCodeAt(0)); }; d("i˜g"); // Note that ˜ is 152 in ASCII TEST.HTML with x-user-defined charset: alert shows

Huge string replace in JavaScript?

萝らか妹 提交于 2019-12-06 04:11:29
I've got a small JavaScript application that will parse files the user drops into the browser. Recently I've discovered an issue with some non-english characters. The file types that are dropped on here are using the Windows-1252 character set, so characters such as ñ , are actually coming through as ñ and I must convert them all to the proper characters. For example, I get Señor which should be Señor in Spanish. I've found an extremely useful website with the collection of the characters, and their counterparts that I need to convert to. I've condensed that down into two JavaScript arrays:

Windows -1252 is not supported encoding name

你离开我真会死。 提交于 2019-12-06 00:00:26
问题 I am working with windows 10 universal App and the ARM CPU to create apps for the Raspberry Pi. I get the following error with encoding: Additional information: 'windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. private async void Login(string passcode) { try { MySqlConnection conn = new MySqlConnection("Server=..."); MySqlCommand cmd; conn.Open(); cmd = new MySqlCommand("Select * from

Character Set Special Characters

独自空忆成欢 提交于 2019-12-05 00:03:02
问题 Is iso-8859-1 a proper subset of utf-8? What about iso-8859-n? What about windows-1252? If the answer is no to any of the above, what are the disjoint characters? I'm testing some logic that detects charsets and want to write tests to verify the detection is working properly. 回答1: Is iso-8859-1 a proper subset of utf-8? The character reportoire of ISO-8859-1 (the first 256 characters of Unicode) is a proper subset of that of UTF-8 (every Unicode character). However, the characters U+0080 to U