If you deal with foreign country/people names, you may have characters from different sets alongside each other. Putting these characters into a database can be challenging.
Below I will highlight how to do this for the Postgres Database. Assuming I have a “country” table with just one field for the name of the country, and I want to insert the country Côte d’Ivoire to the table:
postgres=# INSERT INTO country_table VALUES ('C' || U&'\00F4' || E'te d\'Ivoire');
- The unicode character ‘ô’ is represented by U&’\00F4′
- The character E preceding the last part of the country string is needed to tell Postgres to escape the \’ character within it.