non-ascii-characters

SQL Developer Special Chars

孤人 提交于 2019-12-13 03:24:12
问题 I am having problems with an Oracle Database and the ASCII char encoding. I'm trying to make Update sentences on Varchar2() columns with strings that contains special characters like á, é, í, ó, ú, (spanish) etc. Each time i recover the data from that column, as for example, instead of seeing 'ó', i got '髇' or '髇'. I'm writing Update sentences like: UPDATE TABLE_1 SET DESCRIPTION = 'THIS IS A TEXT WITH SPECIAL CHAR ó ÉND' WHERE ID = '1'; and when i do: SELECT ID ||' | '|| DESCRIPTION FROM

C++ string/char and accents

与世无争的帅哥 提交于 2019-12-13 01:25:36
问题 I'm writing a text writer in C++, which I'll have a string of a phrase and display the appropriate bitmap font for each char value. For now, it's working for the regular characters, but I'm getting weird values for accents and other characters such as À, Á, Â, Ã, etc I'm doing this: int charToPrint = 'a'; //use this value to figure which bitmap font to display The bitmap font does have these characters, but on this line I'm not getting the values I'm supposed to get, such as: 195 for à , 199

How to fix this UnicodeDecodeError that appears when I try to remove accents in Python strings?

大憨熊 提交于 2019-12-13 01:24:42
问题 I'm trying to use this function: import unicodedata def remove_accents(input_str): nkfd_form = unicodedata.normalize('NFKD', unicode(input_str)) return u"".join([c for c in nkfd_form if not unicodedata.combining(c)]) in the code below (which unzips and reads files with non-ASCII strings). But I'm getting this error, (from this library file C:\Python27\Lib\encodings\utf_8.py ): Message File Name Line Position Traceback <module> C:\Users\CG\Desktop\Google Drive\Sci&Tech\projects\naivebayes

Force UTF-8 output using python

守給你的承諾、 提交于 2019-12-13 00:57:28
问题 I have the following error: UnicodeEncodeError: 'ascii' codec can't encode character '\xd7' in position 31: ordinal not in range(128) from this code : test_string = """ Antelope Canyon, Arizona [1600×1068] </a> <span class="domain">(<a """ print(test_string) output of sys.getdefaultencoding : In [6]: sys.getdefaultencoding() Out[10]: 'utf-8' I'm using a Chromebook with crouton - if that makes a difference (I've a feeling that it might). I'm not sure if there's some way of 'forcing' the

Perl SMTP: can't send email with non-ascii characters in body

佐手、 提交于 2019-12-12 10:15:13
问题 Code, sending email (working good): #!/usr/bin/perl use utf8; use strict; use warnings; use Email::Sender::Simple qw(sendmail); use Email::Sender::Transport::SMTP (); use Email::Simple (); use open ':std', ':encoding(UTF-8)'; sub send_email { my $email_from = shift; my $email_to = shift; my $subject = shift; my $message = shift; my $smtpserver = 'smtp.gmail.com'; my $smtpport = 465; my $smtpuser = 'user@gmail.com'; my $password = 'secret'; my $transport = Email::Sender::Transport::SMTP->new({

Highlight words with (and without) accented characters / diacritics in jQuery

故事扮演 提交于 2019-12-12 08:38:53
问题 I'm using the jquery.highlight plugin: http://code.google.com/p/gce-empire/source/browse/trunk/jquery.highlight.js?r=2 I'm using it to highlight search results. The problem is that if I search something like "café" it won't highlight any words. And if I search "cafe" , even though my results contains both "cafe" & "café" , it will only highlight "cafe" . So, I would need to highlight all "versions" of the words, with or without diacritics. Is that possible? 回答1: http://jsfiddle.net/nHGU6/

ASM Replacing scancodes with ASCII characters

旧时模样 提交于 2019-12-12 04:12:41
问题 I have this code: bits 16 org 0x7C00 start: jmp main key: dw 0x1e, 'a', 0x30, 'b' print: mov ah, 0x0E int 0x10 keyboard: cli in al, 0x64 test al, 1 jz return test al, 0x20 jnz return in al, 0x60 call convert call print sti convert: mov bx, 0 .LOOP: cmp al, [key+bx] je .conv add bx, 2 jmp .LOOP .conv: mov al, [key+bx+1] ret return: ret main: call keyboard jmp main times 510 - ($-$$) db 0 dw 0xAA55 It checks for keypressess and everytime I press a key, I save it to register al and then wanna

UnicodeDecodeError after dealing with UnicodeEncodeError

偶尔善良 提交于 2019-12-12 02:45:37
问题 Taking any of the fixes described here gets me past the problem with attempting to run the following: row = ['=HYPERLINK("%s")' % cell if 'http' in str(cell) else cell for cell in row]. against a row like: (17, u'http://british-business-bank.co.uk/what-the-british-business-bank-does/job-vacancies/', u'EMERY MCLAVEN ORR LIMITED', u'10 GREAT PULTENEY STREET, LONDON', u'Senior Manager \u2013 Financial Planning - EMERY MCLAVEN ORR LIMITED', u'http://british-business-bank.co.uk/what-the-british

Non-ASCII character '\xe2' in file but no encoding declared

血红的双手。 提交于 2019-12-11 17:16:32
问题 I wrote a script to extract signals from the MIT-BIH dataset using the wfdb python library. The script was working fine when I was running it on windows but I recently shifted to Mac . After installing all the dependencies I got an error when I tried to import processing from the wfdb library. This is the error I get: SyntaxError: Non-ASCII character '\xe2' in file /usr/local/lib/python2.7/site-packages/scipy/stats/_continuous_distns.py on line 3346, but no encoding declared; see http:/

How to detect and replace non-printable characters from table?

青春壹個敷衍的年華 提交于 2019-12-11 16:32:17
问题 I have imported data from xls file into table. but there are some garbage (non ascii charactors). I want to remove those non printable characters from database. here is the query i found which can select the entries which has non-ascii characters select * from TABLE where COLUMN regexp '[^ -~]'; But how can i remove those characters from table using mysql query or procedure ? Please give suggestions. thanks in advance. 来源: https://stackoverflow.com/questions/11243541/how-to-detect-and-replace