RSS

Tag Archives: character encoding

Adding Unicode Characters to LaTeX documents

While typesetting a travel diary, I wanted to include place names in their local language using their local script.  The book is written entirely in English, and have only a standard text editor, without any exotic script support.  I can look up the local name of the city online, but cutting and pasting can be a challenge, here is how to do it. Read the rest of this entry »

 
Leave a comment

Posted by on April 7, 2015 in LaTeX

 

Tags: ,

Storing Date Values in Files

XML and JSON files store and transport data.  What is the best way to store a Date-Time value? Always, always, always use the integer epoch format: the number of milliseconds since Jan 1, 1970 UTC. This post tells you why. Read the rest of this entry »

 
1 Comment

Posted by on January 17, 2014 in Coding

 

Tags: , , ,

Proper Stream Patterns

Java has streams for bytes, and streams for chars.  Learn to use them correctly.  It can be daunting at first, but if you just learn a few basic patterns, it all works well. Read the rest of this entry »

 
Leave a comment

Posted by on January 7, 2014 in Coding, Example Code

 

Tags: ,

3 reasons that XML should be Streamed and never “Stringed”

XML is a text format, and so it is tempting to handle it with the normal String handling capabilities of Java, but there are several reasons that you must never do this.  XML should either be on the disk as a sequence of bytes, or it should be parsed as a DOM tree of decoded string values, but it should never be in a String in its encoded value. Read the rest of this entry »

 
Leave a comment

Posted by on July 17, 2013 in Coding, Design

 

Tags: , , , ,

#23 UTF-8 Encoding

Wondering what encoding to use for your web pages?  Wonder no longer.  Always use UTF-8 encoding.  It is the single best encoding, supports the most characters, the most languages, and is available on every browser.  That is all you need to know: always use UTF-8. Read the rest of this entry »

 
Leave a comment

Posted by on November 3, 2011 in Coding, practice

 

Tags: , , ,