I have a Ruby CGI (not rails) that picks photos and captions from a web form. My users are very keen on using smart quotes and ligatures, they are pasting from other sources. My web app does not deal well with these non-ASCII characters, is there a quick Ruby string manipulation routine that can get rid of non-ASCII chars?
...
This question contains java and ruby.
I have a java program that I make a call to from ruby.
This code works under merb perfectly without any modifications.
This code will work under irb perfectly by setting $KCODE="UTF8".
For the life of me I can not get it to work under phusion passenger -- this is a problem since our production ser...
X11 maps keycodes to keysyms and then maps keysyms to Unicode. What's a good way to retrieve keysym to Unicode mappings in a program?
...
Hi,
I'm wondering if you guys are aware of any article of some sort that shows how to make code fully unicode? Reason I ask is because I'm dealing with winapi right now and it seems that everything's supposed to be unicode like L"blabla" .. Functions that I've encountered won't work properly by simply using the standard string for examp...
Hi,
I need to save data in sqlite databases with user-chosen filenames. This includes unicode filenames. Is there a way to specify this in the Zeos components in Delphi?
...
How can I check if a weirdo character I'd like to use is included in the used font?
...
Why are the unicode codepoints mentioned as U+ for e.g. U+2202 for ∂.
Why not U- (dash or hypen character) or anything else?
...
When I read a text file to a wide character string (std::wstring) using an wifstream, does the stream implementation support different encodings - i.e. can it be used to read e.g. ASCII, UTF-8, and UTF-16 files?
If not, what would I have to do?
(I need to read the entire file, if that makes a difference)
...
Does anyone know if I use emoji unicode in an app's view if Apple considers this out of bounds? I'm not asking about enabling emoji or selling an app that is meant to enable emoji.
And example of the code - which is placing an NSString into a tableViewCell NSLabel:
if([combatCurrentHp intValue] <= [combatMaxHp intValue] / 2) {
char...
I want to convert my english alphabets to arabic using JavaScript
Do I need to do some kind Unicode conversion for this? An example would be great.
...
Hi there,
I have a MYSQL database which needs to be accessed by both PHP and MySQL scripts, this works fine in most cases, but some "special" characters e.g. double quotes, apostrophes don't display correctly in the ASP scripts.
E.g the MySQL database is from a Drupal installation and contains a table with a field containing the text...
I have this line of code to convert NSString to NSData:
NSData *data = [NSData dataWithBytes:[message UTF8String] length:[message lengthOfBytesUsingEncoding:NSUTF8StringEncoding]];
How do I do this in Unicode instead of UTF8? My message may contain cyrillic characters or diacritical marks.
...
I have a string and I want to check if the content is in English or Hindi(My local language). I figured out that the unicode range for hindi character is from U0900-U097F.
What is the simplest way to find if the string has any characters in this range?
I can use std::string or Glib::ustring depending on whichever is convenient.
...
Some of my users report that the following code may raise a UnicodeDecodeError when the hostname contains non-ascii characters (however I haven't been able to replicate this on my Windows Vista machine):
self.path = path
self.lock_file = os.path.abspath(path) + ".lock"
self.hostname = socket.gethostname()
self.pid = os.g...
Hi everyone.
I have just switched from Builder 6 to Builder 2009 and have a question.
How can I write unicode string to a file?
TBytes Preamble1 = TEncoding::Unicode->GetPreamble();
UnicodeString str1("string1");
int len = TEncoding::Unicode->GetByteCount(str1);
FileWrite( iFile,&Preamble1[0],Preamble1.Length );
FileWrite( iFile,str...
is there a way i can convert a .txt file into unicode by using c#?
...
I am trying to Convert hex representations of Unicode characters to the characters they represent. The following example works fine:
#!/usr/bin/perl
use Encode qw( encode decode );
binmode(STDOUT, ':encoding(utf-8)');
my $encoded = encode('utf8', "\x{e382}\x{af}");
eval { $encoded = decode('utf8', $encoded, Encode::FB_CROAK); 1 }
or p...
I get a string that more or less looks like this:
"C:\\bláh\\bleh"
I make a FileInfo with it, but when I check for its existence it returns false:
var file = new FileInfo(path);
file.Exists;
If I manually rename the path to
"C:\\blah\\bleh"
at debug time and ensure that blah exists with a bleh inside it, then file.Exists starts...
So I'm developing a PHP script that stores form data in an MSSQL DB. It seems the only way to be sure to avoid SQL injection is to use stored procedures, which one should anyway. All is good in English but in other character sets, in this case Thai, I get ?????
I'm sure I'm missing something obvious. Here's the SP:
ALTER PROCEDURE [...
I am trying to troubleshoot this error without success.
I have made a dtsx package on my computer using SQL Server 2008. It imports data from a semicolon delimited csv file into a table where all of the field types are NVARCHAR MAX.
It works on my computer, but it needs to run on the clients server. Whenever they create the same pack...