extended-ascii

Convert Unicode characters to extended ASCII

醉酒当歌 提交于 2021-02-16 14:56:09
问题 I have some binary data that had to be percent encoded to transfer to a remote service via a length-restricted query string parameter. When it comes back to me some of the values are encoded like this: \u2014 I wish to convert this value back to binary data. The Unicode character is the same as the original value in extended ASCII. How can I convert the above back to extended ASCII? Edit: Windows-1252 I would prefer a Javascript solution but can work with: PHP, Python, C, C++. 回答1: Here's the

Is it possible to use extened ASCII characters in a BAT file?

旧街凉风 提交于 2020-01-02 07:44:13
问题 I have a bunch of dynamically created *.BAT files. These BAT files are used to create folders in a server. Just one line in each BAT file, such as: MKDIR \NetworkShare\abc\123 This "abc\123" string is from a database. It runs OK for a while to create thousands subfolders on demand until today it stopped creating a special subfolder which has a "close single quote" ( Alt + 0146 if typing from dos prompt) in the string. I did some research and found that this "close single quote" is an extended

Extended ascii characters search in SQL Server

混江龙づ霸主 提交于 2019-12-31 04:30:13
问题 I have a table where one column may contain data which includes extended ASCII characters (like ♥,♦,♣.... ) When I search for the same using select query the result set doesn't fetch exactly for ex: create table testasci(id int,name varchar(20)) insert into testasci values(1, 'santosh'); insert into testasci values(2, 'santosh♥'); insert into testasci values(3, 'santosh♦'); insert into testasci values(4, 'santosh2'); insert into testasci values(5, 'santoshσ'); insert into testasci values(6,

Can I use iconv to convert multi-byte smart quotes to extended ASCII smart quotes?

大兔子大兔子 提交于 2019-12-29 06:56:46
问题 I have some UTF-8 content that includes multi-byte smart quote characters. I've found that this code will easily convert those characters to ASCII straight quotes (ASCII code 34): $content = iconv("UTF-8", "ASCII//TRANSLIT", $content); OR $content = iconv("UTF-8", "ISO-8859-1//TRANSLIT", $content); However, I'd rather convert these to extended ASCII smart quotes (ASCII codes 147 and 148 in Latin 1 encoding). Does anyone know how to do this? 回答1: You're looking for CP-1252 which contains

Can I use iconv to convert multi-byte smart quotes to extended ASCII smart quotes?

為{幸葍}努か 提交于 2019-12-29 06:56:29
问题 I have some UTF-8 content that includes multi-byte smart quote characters. I've found that this code will easily convert those characters to ASCII straight quotes (ASCII code 34): $content = iconv("UTF-8", "ASCII//TRANSLIT", $content); OR $content = iconv("UTF-8", "ISO-8859-1//TRANSLIT", $content); However, I'd rather convert these to extended ASCII smart quotes (ASCII codes 147 and 148 in Latin 1 encoding). Does anyone know how to do this? 回答1: You're looking for CP-1252 which contains

Converting Non-ASCII code to ASCII equivalent in terms of look

感情迁移 提交于 2019-12-24 11:09:04
问题 I have thousands of name in a mysql database that have the extended ASCII code in them. I want to convert them to a normal english alphabet. Here is an example : Indāpur Jejūri convert to -> Indapur Jejuri So how can I do it ? I know Java and Groovy, and a bunch of other scripting languages but didn't have much luck. Any suggestion ? 回答1: I found the answer after going through many posts in stackoverflow : Converting Symbols, Accent Letters to English Alphabet import java.text.Normalizer;

SQL: Storing Extended ASCII (128 to 255) in VARCHAR

≯℡__Kan透↙ 提交于 2019-12-24 09:47:29
问题 How do you store chars 128 to 255 in VARCHAR..? SQL seems to change some of these to char(63) '?'. I'm not sure if it's something to do with collation? UTF-8? N'..'? I've tried COLLATE Latin1_General_Bin, not sure if it supports extended ascii though.. Obviously works with NVARCHAR, but in theory this should work in VARCHAR too..? 回答1: The character stored in varchar/char columns beyond the ASCII 0-127 character range is determined by the code page associated with the collation. Characters

How can I find extended ASCII characters in a file using Perl?

社会主义新天地 提交于 2019-12-23 10:51:02
问题 How can I find extended ASCII characters in a file using Perl? Can anyone get the script? .....thanks in advance..... 回答1: Since the extended ASCII characters have value 128 and higher, you can just call ord on individual characters and handle those with a value >= 128. The following code reads from stdin and prints only the extended ASCII characters: while (<>) { while (/(.)/g) { print($1) if (ord($1) >= 128); } } Alternatively, unpack together with chr will also work. Example: while (<>) {

Similar looking UTF8 characters for ASCII

眉间皱痕 提交于 2019-12-22 00:13:12
问题 I'm looking for a table which contains ASCII characters and same looking UTF8 characters. I know it also depends on the font is they look the same, but something generic to start with is enough. >>> # PY3 code: >>> a='H' # ascii >>> b='Н' # utf8 >>> a==b False >>> ' '.join(format(ord(x), 'b') for x in a) '1001000' >>> ' '.join(format(ord(x), 'b') for x in b) '10000011101' >>> a='P' # ascii >>> b='Ρ' # utf8 >>> a==b False >>> ' '.join(format(ord(x), 'b') for x in a) '1010000' >>> ' '.join

Using nzload to load special characters

僤鯓⒐⒋嵵緔 提交于 2019-12-20 05:34:27
问题 I have extended ascii chars in Oracle table data which I am able extract to a file using sqlplus with the \ escape character prefixed. I want to use nzload to load the exact same data into a netezza table. nzload adds a couple of extra bytes when it encounters this char seq (c2bf) in the extracted file data: echo "PROFESSIONAL¿" | od -x 0000000 5052 4f46 4553 5349 4f4e 414c **c2bf** 0a00 after nzload: echo "PROFESSIONAL¿" | od -x 0000000 5052 4f46 4553 5349 4f4e 414c **c382 c2bf** on the