characters

Problem with cyrillic characters in Ruby on Rails

Hi, In my rails app I work a lot with cyrillic characters. Thats no problem, I store them in the db, I can display it in html. But I have a problem exporting them in a plain txt file. A string like "элиас" gets "—ç–ª–∏–∞—Å" if I let rails put in in a txt file and download it. Whats wrong here? What has to be done? Regards, Elias ...

using unicode characters with wxPython

hi everybody! i have a problem with wxpython and his rich text control, when i try to insert unicode characters... \xb2 prints an apex '2', '\u2074' should print an apex '4'... edit: i use windows vista... and i tried 'coding cp1252 ' and 'utf-8' but with the same result... 2edit: on vista it crashs, on xp it shows a strange square (i g...

Regex - ignore certain characters in quotes

Hello fellow developers, I tried searching for the answer to this, but I couldn't find anything too helpful in this situation. It's possible that I'm not searching the correct terms. I'm having trouble with this regex. Consider this string: $str = "(1, 2, 'test (foo) bar'), (3, 4, '(hello,world)')"; I want to end up with a multi...

How can I get more than 11 characters into the name of my app on iPhone?

The name I want to use for my app has 12 characters, I had read that Apple will only allow 11 at this time, but then I found an app with 13 (tiltshiftfocus). I was wondering if there is anything special I need to do in order to submit my 12 character app name? ...

python: how to remove certain characters

how do i write a function removeThese(stringToModify,charsToRemove) that will return a string which is the original stringToModify string with the characters in charsToRemove removed from it. ...

Non-binary(hex) characters in string received over TCP with Python

Hi, maybe this is a noob question, but I'm receiving some data over TCP and when I look at the string I get the following: \x00\r\xeb\x00\x00\x00\x00\x01t\x00 What is that \r character, and what does the t in \x01t mean? I've tried Googling, but I'm not sure what to Google for... thanks. ...

.NET: Reading/writing binary string

EDIT: Don't answer; I've found the solution on my own. I have some code that does this: using (var stream = new FileStream(args[1], FileMode.Create)) { using (var writer = new BinaryWriter(stream)) { writer.Write(ip.Iso3166CountryCode); ... } } Iso3166CountryCode is a string with two characters ("US"). When I try to read "US"...

HTML form with spanish characters displayed wrong in MySQL database

So I'm sending data to my MySQL database through a HTML form. When I send a word with special characters like "ñ" or accents "á, é, í.." and when I check the result in the tables those characters are displayed as "ã±". I tried pretty much everything: my html form page header has <meta http-equiv="Content-Type" content="text/html;cha...

PHP - Get part of string by searching for characters, instead of counting them?

With the substr() function i must enter where i want to cut the string by numbers, is there any way of cutting a string by passing words or characters? Something like this: <?php $string = "Hey there world!"; magic_substr($string, "there ", "!"); // returns "world" ?> Is there a function like that? If so, i've missed something ...

Code sample to remove all special characters from data stored in MYSQL ?

Does anyone have a code sample where I can to remove all special characters from data stored in MYSQL? I need to remove the following special characters: : ~!@#$%*()_+{}[];':"<>? ...

When accessing individual characters in a string in Perl, is substr or splitting to an array faster?

I'm writing a Perl script in which I need to loop over each character of a string. There's a lot of strings, and each is 100 characters long (they're short DNA sequences, in case you're wondering). So, is it faster to use substr to extract each character one at a time, or is it faster to split the string into an array and then iterate o...

Handle special characters in ASCII

Hello, My Javascript function returns a char arrya which might contain non-printable characters. In fact each character is a byte (represented as a number from 0-255). The problem is that when I try to copy this char array to the notepad, for example, I get these results: ORIGINAL STRING IN JAVASCRIPT: performance of thisĎask, ćd so mo...

How to parse time range input?

Hi all, In a program I'm working on, i need the user to input time ranges, such as 2002-2003, or 1999- (implied present), or -2000 (before 2000). I have an ArrayList of objects, and so the user might put it the title of books, including some information (one of these must be the date it was published). They can then search for a spec...