character

Character Array in C

When we define a character array as 'char name[10]', this indicate that the array 'name' can hold a string of length ten character. But in the program shown below the array name can hold more than ten characters. How is this possible? //print the name of a person. char name[10]; scanf("%s",name); printf("%s",name); Here if I e...

selenium how to verify character font?

the problem as the title. ...

Adding Counter to HTML Form and Calculate Credits

I have a simple HTML Form that allows the user to enter some text which is then sent as an SMS/TXT Message via an SMS Gateway. The user enters the message text into a textarea: <textarea rows="10" cols="40" id="smsbody" validate = "required:true" name="MessageBody"></textarea> They can enter as little or as much text as they like, how...

I want to see if a character is present in a string.

Hi, I'm programming a program in C++ (typical game) in which you need to guess a letter and it will check if it is present in a string. For example Secret String: I like to program. Guess1: 'a' Display: . .... .. .....a... Etc. But i don't know how to see if a character is in this secret string. I'm using std::string (obligatory)...

How do i read single character input from keyboard using nasm (assembly) under ubuntu?

Hi, I'm using nasm under ubuntu. By the way i need to get single input character from user's keyboard (like when a program ask you for y/n ?) so as key pressed and without pressing enter i need to read the entered character. I googled it a lot but all what i found was somehow related to this line (int 21h) which result in "Segmentation F...

Delimiter for meta data in Windows file name

I'm working on maintenance of an application that transfers a file to another system and uses a structured filename to include meta data including a language code. The current app uses a two character language code and a dash/hyphen for a delimiter. Ex. Canada-EN-ProdName-ProdCode.txt I'm converting it to use IETF language code and so...

Remove "empty" character from String

I'm using a framwork which returns malformed Strings with "empty" characters from time to time. "foobar" for example is represented by: [,f,o,o,b,a,r] The first character is NOT a whitespace (' '), so a System.out.printlin() would return "foobar" and not " foobar". Yet, the length of the String is 7 instead of 6. Obviously this makes m...

SubSonic and MySql character encoding problem

I have a problem with character encoding when using subsonic (3.0.4) and mysql (5.1). I don't know how to specify ISO 8859-2/Latin2 encoding in SubSonic. ...

How to insert new line 3 white spaces or 2 words prior to specific character.

I was trying to format a chat log for a friend that looks like this: John Smith > hello Jane doe > hey how are you? John Smith > Pretty good thanks and she wants to format it like this: John Smith > hello Jane doe > hey how are you? John Smith > Pretty good thanks Simply entering a new line after > is not good enough as it would ...

mysql ’ show up as ’

Hi there, when I try and run: mysql -u myUser -pPassword -D myDatabase -h myHost < toInsert.sql from my ubuntu desktop where myHost is a remote Red Hat server and toInsert.sql contains ’ they show up as ’ How can I resolve this? Note! ’ is NOT the same as ' When I run toInsert.sql from a windows machine with a mysql gui client I ...

In flex, how to find the number of characters that can be fit for a text control of a given height?

In flex, I have mx:Text component. How can I find how many characters can fit into it without vertical scroll for a certain height & font etc. ...

How to convert an accented character in an unicode string to its unicode character code using Python?

Just wonder how to convert a unicode string like u'é' to its unicode character code u'\xe9'? Thank you for your help. ...

Problem with special characters and multilanguages

Please i have asked this question before, hopin to get responses this time I created a simple comment wall that submits using ajax. Using javascript i collect user input: var sharetxt = encodeURIComponent(document.getElementById("cw_share_txt").value); then pass it to a php page, on the php page, i collect the passed data: $text=n...

What's this text encoding ?

Hi, I used Python's imaplib to pull mail from a gmail account... but I got an email with this confusing text body: > RGF0ZSBldCBoZXVyZTogICAgICAgICAgICAgICAgICAgICAgICAgICAyMi8wOC8yMDEwIDE0 > OjMzOjAzIEdNVCBVbmtub3duDQpQcsOpbm9tOiAgICAgICAgICAgICAgICAgICAgICAgICAg > ICAgICAgICAgamFjaW50bw0KTm9tOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI...

ORA-12704: Unable to convert character data

I am trying to perform SET operations in Oracle across remote databases. I am using the MINUS operator. My query looks something like this. SELECT NAME FROM localdb MINUS SELECT NAME from remotedb@dblink This is throwing up a ORA-12704 error. I understand this warrants some kind of conversion or a NLS Setting. What should I try nex...

PHP String in Array Only Returns First Character

Hi Everyone, For the next week, I'm stuck with a sadly very slow 1-bar EDGE internet connection, so forgive me if I didn't spend quite enough time researching this one, but I just set up a local server for testing code that I would normally test over the internet, and it doesn't seem to be working the same way on my local LAMP install. ...

char limit with php file_get_contents() and Google Chart API?

Hi, the specific issue I am working on is enabling https with Google charts API, and a possible character limit when using php file_get_contents on a url string. Let me take you through what is going on. I have made good progress using some tutorials on the net, specifically to enable the https. I am using their 'basic method' from this ...

Character encoding issues and PHP - what encoding is this?

I have a file on my computer that I wanted to copy into a MySQL table using PHP. When I open the file the contents look fine, like normal text - but, when I attempt to read the file using PHP or insert into a MySQL table, I get all sorts of funky characters. I thought perhaps it was a utf-8 issue, so I tried setting the header header('C...

C++ remove character from string

Hi! I am currently trying to implement deleting characters from a text field in C++. If the user hits Backspace, the following code is executed. There is currently no cursor, it should just remove the last character... if (mText.length() > 0){ mText.erase( mText.length() - 1, 1); // mText.resize(mText.length() - 1); } This wo...

Hard time with escape character

I need to strip out a few invalid characters from a string and wrote the following code part of a StringUtil library: public static String removeBlockedCharacters(String data) { if (data==null) { return data; } return data.replaceAll("(?i)[<|>|\u003C|\u003E]", ""); } I have a test file illegalCharacter.txt with one l...