tagged [character]

Add an int to a char in c# to move its ascii value up (just like in c++)

Add an int to a char in c# to move its ascii value up (just like in c++) In c++ this code would work: This would do the same as `c='c'`. How can I do the same in c#?

14 May at 12:20

How can I solve a "base64 invalid characters" error?

How can I solve a "base64 invalid characters" error? When I m trying to convert the value1 to byte[] using the following code: Ι received an error that the string contents invalid base-64 characters.....

9 Aug at 17:56

FPDF utf-8 encoding (HOW-TO)

FPDF utf-8 encoding (HOW-TO) Does anybody know how to set the encoding in FPDF package to UTF-8? Or at least to ISO-8859-7 (Greek) that supports Greek characters? Basically I want to create a PDF file...

How to set standard encoding in Visual Studio

How to set standard encoding in Visual Studio I am searching for a way to setup Visual Studio so it always saves my files in UTF-8. I have only found options to set this project wide. Is there a way t...

Check if a character is a vowel or consonant?

Check if a character is a vowel or consonant? Is there a code to check if a character is a vowel or consonant? Some thing like char = IsVowel? Or need to hard code?

20 Jul at 17:19

Convert data.frame column format from character to factor

Convert data.frame column format from character to factor I would like to change the format (class) of some columns of my data.frame object (`mydf`) from to . I don't want to do this when I'm reading ...

6 Dec at 08:37

What is the easiest/best/most correct way to iterate through the characters of a string in Java?

What is the easiest/best/most correct way to iterate through the characters of a string in Java? Some ways to iterate through the characters of a string in Java are: 1. Using StringTokenizer? 2. Conve...

Better way to remove specific characters from a Perl string

Better way to remove specific characters from a Perl string I have dynamically generated strings like `@#@!efq@!#!`, and I want to remove specific characters from the string using Perl. Currently I am...

27 Nov at 15:40

How to check if character is a letter in Javascript?

How to check if character is a letter in Javascript? I am extracting a character in a Javascript string with: and I would like to check whether it is a letter. Strangely, it does not seem like such fu...

15 Sep at 16:38

How do i replace accents (german) in .NET

How do i replace accents (german) in .NET I need to replace accents in the string to their english equivalents for example ä = ae ö = oe Ö = Oe ü = ue I know to strip of them from string but i was una...

Best way to convert string to bytes in Python 3?

Best way to convert string to bytes in Python 3? [TypeError: 'str' does not support the buffer interface](https://stackoverflow.com/questions/5471158/typeerror-str-does-not-support-the-buffer-interfac...

How do you properly use WideCharToMultiByte

How do you properly use WideCharToMultiByte I've read the documentation on [WideCharToMultiByte](http://msdn.microsoft.com/en-us/library/ms776420(VS.85).aspx), but I'm stuck on this parameter: I'm not...

Repeat a string in JavaScript a number of times

Repeat a string in JavaScript a number of times In Perl I can repeat a character multiple times using the syntax: Is there a simple way to accomplish this in Javascript? I can obviously use a function...

22 Jan at 03:3

Remove all occurrences of char from string

Remove all occurrences of char from string I can use this: Is there a way to remove all occurrences of character `X` from a String in Java? I tried this and is not what I want: `str.replace('X',' '); ...

11 Apr at 12:46

Regular expression \p{L} and \p{N}

Regular expression \p{L} and \p{N} I am new to regular expressions and have been given the following regular expression: I know what * means and | means "or" and that \ escapes. But what I don't know ...

15 Feb at 09:18

Invalid characters in File.ReadAllText

Invalid characters in File.ReadAllText I'm calling `File.ReadAllText()` in a program designed to format some files that I have. Some of these files contain the `®` (174) symbol. However, when the tex...

How to convert Strings to and from UTF8 byte arrays in Java

How to convert Strings to and from UTF8 byte arrays in Java In Java, I have a String and I want to encode it as a byte array (in UTF8, or some other encoding). Alternately, I have a byte array (in som...

Is " " a replacement of " "?

Is " " a replacement of " "? In my ASP.NET application, I was trying to add few white spaces between two text boxes by typing space bar. The equivalent HTML source was ` ` instead of `&...

Characters allowed in GET parameter

Characters allowed in GET parameter Which characters are allowed in GET parameters without encoding or escaping them? I mean something like this: [http://www.example.org/page.php?name=XYZ](http://www....

Data loss when converting UTF-8 XML to Latin-1?

Data loss when converting UTF-8 XML to Latin-1? If I convert a UTF-8-encoded XML document (which has an XML prolog declaring the encoding to be UTF-8) to Latin-1 using xmllint, will there be any data ...

21 Jan at 17:40

PHP output showing little black diamonds with a question mark

PHP output showing little black diamonds with a question mark I'm writing a php program that pulls from a database source. Some of the varchars have quotes that are displaying as black diamonds with a...

13 Nov at 17:59

How can I check the first character in a string in Bash or Unix shell?

How can I check the first character in a string in Bash or Unix shell? I'm writing a script in Unix where I have to check whether the first character in a string is "/" and if it is, branch. For examp...

C# method to do URL encoding?

C# method to do URL encoding? what c# class method can I use to URL encode a URL string? In my use case I want to pass a URL string as a URL parameter itself. So like burying a URL within a URL. Witho...

1 Oct at 22:36

Working with UTF-8 encoding in Python source

Working with UTF-8 encoding in Python source Consider: How can I declare UTF-8 strings in source code?

How to change the DataContractSerializer text encoding?

How to change the DataContractSerializer text encoding? When writing to a stream the `DataContractSerializer` uses an encoding different from Unicode-16. If I could force it to write/read Unicode-16 I...