All Questions

27
votes
3answers
8031 views

Trouble with UTF-8 characters; what I see is not what I stored

I tried to use UTF-8 and ran into trouble. I have tried so many things; here are the results I have gotten: ???? instead of Asian characters. Even for European text, I got Se?or for Señor. Strange...
232
votes
16answers
288635 views

How to use unicode characters in Windows command line?

We have a project in Team Foundation Server (TFS) that has a non-English character (š) in it. When trying to script a few build-related things we've stumbled upon a problem - we can't pass the š let...
369
votes
6answers
219439 views

What exactly do "u" and "r" string flags do, and what are raw string literals?

While asking this question, I realized I didn't know much about raw strings. For somebody claiming to be a Django trainer, this sucks. I know what an encoding is, and I know what u alone does since I...
97
votes
11answers
62664 views

Python, Unicode, and the Windows console

When I try to print a Unicode string in a Windows console, I get a UnicodeEncodeError: 'charmap' codec can't encode character .... error. I assume this is because the Windows console does not accept ...
786
votes
14answers
903639 views

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)

I'm having problems dealing with unicode characters from text fetched from different web pages (on different sites). I am using BeautifulSoup. The problem is that the error is not always reproducibl...
1362
votes
35answers
661901 views

Print in terminal with colors?

How can I output colored text to the terminal, in Python? What is the best Unicode symbol to represent a solid block?
147
votes
8answers
82138 views

Javascript + Unicode regexes

How can I use Unicode-aware regular expressions in JavaScript? For example, there should be something akin to \w that can match any code-point in Letters or Marks category (not just the ASCII ones), a...
577
votes
19answers
388334 views

What's different between UTF-8 and UTF-8 without BOM?

What's different between UTF-8 and UTF-8 without a BOM? Which is better?
360
votes
5answers
212090 views

What does the 'b' character do in front of a string literal?

Apparently, the following is valid syntax my_string = b'The string' I would like to know: What does this b character in front of the string mean? What are the effects of using it? What are approp...
603
votes
11answers
229299 views

std::wstring VS std::string

I am not able to understand the differences between std::string and std::wstring. I know wstring supports wide characters such as Unicode characters. I have got the following questions: When should ...

Previous Next