non-ascii-characters

Server implementation of RFC 2388 multipart POST conflict with RFC 2047?

本秂侑毒 提交于 2019-12-10 03:29:12
问题 I'm trying to implement RFC 2388 on a HTTP server to support multipart POST. I am looking at the specification specifically at the content-disposition's "name" parameter. Under section 3 of RFC 2388 it states: Field names originally in non-ASCII character sets may be encoded within the value of the "name" parameter using the standard method described in RFC 2047. I have 'heard' that no UA currently support RFC2047 on form control names. They will simply send the text in it's original encoding

Why non-ascii chars are displayed as weird symbols?

我的梦境 提交于 2019-12-09 03:41:28
问题 I have 2 cases here: My Database contains lots of info which I want to fetch to the page, some of these info are name which contain non-ascii chars like Uwe Rülke - Old solution which works well: I fetch the data from DB and populate the page directly from a VB while loop. In this case all the chars are displaying correctly Uwe Rülke - New solution which doesn't work properly: The VB's While loop doesn't throw the data directly to the page, rather in a JS strings (to enhance performance by

Displaying accented character in Javascript

妖精的绣舞 提交于 2019-12-09 03:17:26
I am having problem displaying accented character in my app; It is showing ⛽ instead of ó . The string is coming from a json file retrieved from a server. Here are the technical details: JSON: ( This is the object being retrieved from the server ) notice the 3rd key "Relación" the letter "o" is accented. [ { "key": "Canales" }, { "key": "Productos" }, { "key": "Relación con el ejecutivo" } ] Ajax ( here is the code to retrieve the information ) notice I already added charset=utf-8 as most answers suggest $.ajax({ url: url, type: "GET", dataType: "json", contentType: "application/json; charset

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

我的未来我决定 提交于 2019-12-08 19:47:27
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({ host => $smtpserver, port => $smtpport, sasl_username => $email_from, sasl_password => $password,

haskell: output non-ascii characters

試著忘記壹切 提交于 2019-12-08 18:35:15
问题 I'd like to output non-ascii characters in WinGHCi, but this is what I get: Prelude> "δ" "\948" Prelude> putStr "\948" *** Exception: <stdout>: hPutChar: invalid argument (character is not in the code page) I am using WinGHCi 7.0.3 on windows xp. What do I have to do so that WinGHCi prints a nice little delta? 回答1: Works on OSX! Prelude> putStrLn "\948" δ Sounds like this is a windows problem with nothing to do with haskell... 回答2: This is a WinGHCI bug. Use GHCI (the console, non-GUI version

Non-ascii characters in URL

回眸只為那壹抹淺笑 提交于 2019-12-08 18:23:17
问题 I ran into a new problem that I've never seen before: My client is adding files to a project we built and some of the filenames have special characters in them because some of the words are spanish. For example a file I'm testing has an á in it. I am calling that image in a css file as a background image but in Safari it doesnt show up. But it does on FF and Chrome. As a test I pasted the link into the browser and the same thing. Works on FF and Chrome but Safari throws an error. So the

UnicodeDecodeError in Python 3 when importing a CSV file

烈酒焚心 提交于 2019-12-08 14:47:34
问题 I'm trying to import a CSV, using this code: import csv import sys def load_csv(filename): # Open file for reading file = open(filename, 'r') # Read in file return csv.reader(file, delimiter=',', quotechar='\n') def main(argv): csv_file = load_csv("myfile.csv") for item in csv_file: print(item) if __name__ == "__main__": main(sys.argv[1:]) Here's a sample of my csv file: foo,bar,test,1,2 this,wont,work,because,α And the error: Traceback (most recent call last): File "test.py", line 22, in

find files with non-ascii chars in file name [closed]

孤人 提交于 2019-12-08 13:58:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Is there a way I can find files with non-ascii chars? I could use a pipe of course - and filter the files with perl, but for efficiency I'd like to set it all in find . I tried the following: find . -type f -name '*[^[:ascii:]]*' it doesn't work at all. Edit : I'm now trying to make use of find . -type f -regex

Help Replacing Non-ASCII character in Python

纵然是瞬间 提交于 2019-12-08 12:18:21
问题 I have a bunch of HTML files I downloaded using HTTPLIB2 package in Python. ' ' are showing as 'Â '. <font color="#ff0000">02/12/2004Â </font> is showing while <font color="#ff0000">02/12/2004 </font> is the desired format. How do I replace the 'Â ' with ' ' in Python? Thanks a lot! 回答1: You've got an encoding problem. Instead of trying to remove this characters, look for the encoding of the page, then when you read the file, use the codecs module instead of open() , using the proper

Replacing all non-ASCII characters, except right angle character in C#

♀尐吖头ヾ 提交于 2019-12-08 08:09:47
问题 Writing a file utility to strip out all non-ASCII characters from files. I have this Regex: Regex rgx = new Regex(@"[^\u0000-\u007F]"); Which works fine. But unfortunatly, I've discovered some silly people use right angles (¬) as delimiters in their files, so these get stripped out as well, but I need those! I'm pretty new to Regex, and I do understand the basics, but any help would be awesome! Thanks in advance! 回答1: You just need to include the code point for the angle bracket in the set: