Why is the behaviour of subtracting characters implementation specific?

The OP is asking about a direct quote from the standard — N1570 §6.10.1p3,4 + footnote 168: … the controlling constant expression is evaluated according to the rules of 6.6. … This includes interpreting character constants, which may involve converting escape sequences into execution character set members. Whether the numeric value for these character constants … Read more

PostgreSQL: character with byte sequence 0xc2 0x81 in encoding “UTF8” has no equivalent in encoding “WIN1252”

You should know what encoding is used in your database. SHOW server_encoding; When you connect to your database you can specify what encoding should your client use: SET client_encoding TO ‘UTF8’; If server and client encoding differ, the database driver tries to translate between those two encoding. When it can not find an equivalent character, … Read more

UTF8 Postgresql Create Database Like MySQL (including character set, encoding, and lc_type)

Yes, you can be more specific. For example: CREATE DATABASE “scratch” WITH OWNER “postgres” ENCODING ‘UTF8’ LC_COLLATE = ‘en_US.UTF-8’ LC_CTYPE = ‘en_US.UTF-8’; Also I recommend to read the following pages about locales and collations in PostgreSQL: http://www.postgresql.org/docs/current/interactive/locale.html http://www.postgresql.org/docs/current/interactive/collation.html

Java Unicode encoding

You can handle them all if you’re careful enough. Java’s char is a UTF-16 code unit. For characters with code-point > 0xFFFF it will be encoded with 2 chars (a surrogate pair). See http://www.oracle.com/us/technologies/java/supplementary-142654.html for how to handle those characters in Java. (BTW, in Unicode 5.2 there are 107,154 assigned characters out of 1,114,112 slots.)

Batch convert latin-1 files to utf-8 using iconv

You shouldn’t use ls like that and a for loop is not appropriate either. Also, the destination directory should be outside the source directory. mkdir /path/to/destination find . -type f -exec iconv -f iso-8859-1 -t utf-8 “{}” -o /path/to/destination/”{}” \; No need for a loop. The -type f option includes files and excludes directories. Edit: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)