After creating a batch file in visual studio, I get an error when I run it about invalid characters. Does anyone know the default character encoding for txt files?
I have been wondering why when I set the encoding to UTF-8 and rendering the XML it replace the extended characters by escape characters (or character reference) like ’ instead of '?
I'm using the Render method
render(contentType:"text/xml", encoding:"UTF-8") {...}
with a proper header
render(contentType:"text/xml", encoding:"UTF-8", text:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
Any idea if there is a way to write it properly?
Thanks.
If I have a string that looks like either
./A/B/c.d
OR
.\A\B\c.d
How do I get just the "./A/B/" part? The direction of the slashes can be the same as they are passed.
This problem kinda boils down to: How do I get the last of a specific character in a string?
Basically, I want the path of a file without the file part of it.
I am facing a peculiar problem where i need to update a particular value in database to say 'Hellò'. When i run normal update statement the values are updated fine. But when i put it i a .sql script file and then run the update statement the last character gets replaced by a junk value. Can some one enlighten me on this and how oracle processes script files?
Is there a way to detect the character encoding set in the terminal which is calling my Java program? In Windows I can call the "chcp" tool and parse the output.
But what about in Linux or Mac?
Using Python I need to insert a newline character into a string every 64 characters. In Perl it's easy:
s/(.{64})/$1\n/
How could this be done using regular expressions in Python?
Is there a more pythonic way to do it?
I have the following c# code embedded in a literal <% %> of a c# asp.net page
string commandString = "SELECT tblData.Content " +
"FROM tblData " +
"WHERE (tblData.ref = N\'%"+myCurrentREF+"%\')";
This is breaking my code since it apparently cannot use the \' escape character. Why is it so? other escape characters like \" are working so why isn't \' working?
What are the valid characters that can be used in a URL query variable?
I'm asking because I would like to create GUIDs of minimal string length by using the largest character set so long as they can be passed as a URL query variable (www.StackOverflow.com?query=guiddaf09834fasnv)
Is there a character sequence recognized as a newline that's defined by the C standard and/or recognized by GCC? How can newlines be simulated after preprocessor macros to have them and C code share the same line?
#include <stdlib.h> [NEWLINE] int main() { exit(EXIT_SUCCESS); }
I am trying to find words starts with a specific character like:
Lorem ipsum #text Second lorem ipsum.
How #are You. It's ok. Done.
Something #else now.
I need to get all words starts with "#". so my expected results are #text, #are, #else
Any ideas?
What is the minimum number of bits needed to represent a single character of encrypted text.
eg, if I wanted to encrypt the letter 'a', how many bits would I require. (assume there are many singly encrypted characters using the same key.)
Am I right in thinking that it would be the size of the key. eg 256 bits?
I encounter this error (warning: unmappable character for encoding ASCII)
when compiling the files using apache-ant-1.7.0 through hudson build server can anyone advise on how to resolve this? I am able to build successfully using windows machine.
I'm using zend frame work zend form and zend db for my project.
The problem I have is, when the user enter some special characters in the text field (i.e "I'm"), it is saved in the database with the "\" character (i.e. "I\'"). I need to know how to fix this so it just saved as whatever the user entered.
hi,
How can I make upper-case the first character of each word in a string accept a couple of words which I don't want to transform them, like - and, to, etc?
For instance, I want this - ucwords('art and design') to output the string below,
'Art and Design'
is it possible to be like - strip_tags($text, '<p><a>') which we allow and in the string?
or I should use something else? please advise!
thanks.
Hi,
During my file upload process, I found illegal character getting saved in Table. zurück.pdf, C _Word.doc were the file names. Here ü, space between C and _Word was found as ? in the Table Column. I have validate the filename in client side by replacing non-alpha numeric values by _ (underscore), but still it escapes and persist into DB. How can these handled in Client side?
I have to create an SQL Query to get all rows starting with a specific character, except if the parameter passed to the (PHP) function is 0, in that case it should get every row that does not start with A - Z (like #0-9.,$ etc).
What is the easiest and fastest way to get those rows?
DB: MySQL 5.1
Column: title
Hi,
I write a little ruby script, which sends me an email when a new commit added to our svn.
I get the log with this code:
log = `/usr/bin/svnlook log #{ARGV[0]}`
When I run my script from bash I get good encoded character in the email, but when I try it and create a new commit I get wrong hungarian characters.
I commited this:
tes
oéá
I get this in the email:
Log: tes
?\197?\145?\195?\169?\195?\161
How can I solve this issue?
Can I pass NULL pointer to the first argument of device_create function?
I'm using device_create() to create character device file in sysfs. This file don't represent any physical device (it is used to provide an access to a set of devices connected to various buses). What class should I use with device_create() to create such a file?
I am using mysql_fetch_assoc($query), one of the bit field returns out to be , which is supposedly to be true.
The problem is that I also need to output this to xml and it's an illegal xml character.
the charset for the db table is utf-8. why does this happen?
If I try this statement:
INSERT INTO TerminalEventChild (id,stringValue) VALUES
(64,'version123|');
MySQL fail with :
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''version123' at line 1
SQLState: 42000
ErrorCode: 1064
If I remove the | character, everything works fine. Any idea?
hi,
when i try to convert form utf-8 string to NSString like so:
NSString *s = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", s);
i get the compile error:
incomplete universal character name
note that it sometime just works fine:
NSString *UAE = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", UAE);
and the output:
????????
so why is that happening? please help.
I'm developing a twitter app, and when I submit a new tweet from php with abrahams twitteroauth and with any special character it submits it to twitter as the HTML identity. I've tried all the html_entity_decode() and the htmlspecialchars_decode() but nothings working. Thank you :)
hi,
how to get in python from string not one character, but two?
I have:
long_str = 'abcd'
for c in long_str:
print c
and it gives me like
a
b
c
d
but i need to get
ab
cd
I'm new in python.. is there any way?
I am writing a documentation on a PHP framework. I make a lot use of this | character. It is some kind of separator, but does anyone know the exact name of it.