Skip to main content Skip to docs navigation

Character Encoding

An encoding defines a mapping between bytes and text. A sequence of bytes allows for different textual interpretations. By specifying a particular encoding (such as UTF-8), we specify how the sequence of bytes is to be interpreted.

On this page

Character encoding

For example, in HTML we normally declare a character encoding of UTF-8, using the following line:

html
                                    
                                        
                                            
                                                <
                                                meta
                                            
                                            charset
                                            
                                                =
                                                "
                                                utf-8"
                                            
                                            />
                                        
                                    
                                

This ensures that you can use characters from just about any human language in your HTML document, and they will display reliably.

See also

Updated on April 20, 2024 by Datarist.