Copyright © 2001 - 2007 SILC Project SILC Project Website | SILC Toolkit Reference Manual Index

SILC Toolkit Reference Manual
SILC VCard Library
SILC VCard Interface
SILC Crypto Library
Introduction to SILC RNG
SILC RNG Interface
SILC Cipher API
SILC PKCS API
SILC Public Key API
SILC PKCS #1 API
SILC Hash Interface
SILC HMAC Interface
SILC Client Library
Using SILC Client Library Tutorial
Arguments for command_reply Client Operation
SilcStatus Error Arguments in command_reply Client Operation
Arguments for notify Client Operation
Unicode and UTF-8 Strings in Client Library
Client Library Interface Reference
Client Entry Interface Reference
SILC Math Library
SILC MP Interface
SILC Math Interface
SILC Application Utility Library
SILC Application Utilities
SILC ID Cache Interface
SILC Key Repository Library
SILC SKR Interface
SILC ASN.1 Library
SILC ASN.1 Interface
SILC BER interface
SILC Key Exchange Library
SILC SKE Interface
SILC Connection Authentication Interface
SILC SFTP Library
SILC SFTP Interface
SFTP Filesystems Interface
SILC Core Library
SILC Authentication Interface
SILC Message Interface
SILC Channel Interface
SILC Command Interface
SILC Notify Interface
SILC Status Types
SILC Modes
SILC ID Interface
SILC Argument Interface
SILC Attributes Interface
Packet Engine Interface
SILC Public Key Payload Interface
SILC Utility Library
Basic Types and Definitions
Data Buffer Interface
Data Buffer Format Interface
Hash Table Interface
Memory Allocation Interface
Data Stack (memory pool) Interface
Finite State Machine Interface
Thread Interface
Mutual Exclusion Lock Interface
Condition Variable Interface
Atomic Operations Interface
Network (TCP and UDP) Interface
Scheduler Interface
Asynchronous Operation Interface
Abstract Stream Interface
Socket Stream Interface
File Descriptor Stream Interface
File Utility Functions
String Utility Interface
Snprintf Interface
UTF-8 String Interface
Stringprep Interface
Utility Functions
List Interface
Dynamic List Interface
MIME Interface
Time Utility Functions
Logging Interface
Config File Interface
SILC HTTP Library
SILC HTTP Server Interface
SILC HTTP PHP Translator
Resource Links
SILC Project Website
SILC Protocol Documentation
SILC White Paper
SILC FAQs

Unicode and UTF-8 Strings in Client Library
This document describes how the client library handles UTF-8 encoded strings. By default all strings in the SILC protocol are UTF-8 encoded. All strings that are sent to server and strings that are received from the server are always UTF-8 encoded. It is application's responsibility to render the strings as well as possible on the user interface.
Exception to these strings are messages sent and received in Message Payload, which can include practically any kind of strings with any kind of character encodings, and binary data also. If UTF-8 encoded message is sent or received it is indicated with the SILC_MESSAGE_FLAG_UTF8, and application can render the messages accordingly.
Other strings are always UTF-8 encoded and application needs to decode the strings to other character encoding if application does not support UTF-8 rendering on user interface. Also strings application sends to library, such as, nicknames, channel names, server names, host names, topic srings, any command argument, etc. must always be UTF-8 encoded before they are sent to the library. The UTF-8 routines help the application developer to encode and decode UTF-8 strings.
The client library does not ever encode or decode strings to or from the current locale. The library always expects that all strings it receives from application are already UTF-8 encoded. The library may validate certain UTF-8 strings and return error if needed. Server may also send errors in command reply if strings are not encoded properly.
Nicknames and channel names in SILC are also UTF-8 encoded and can include practically any kind of letters, numbers and punctuation marks. Control characters and other special characters are not allowed in nickname strings, and application never receives such nicknames or channel names from the library.

Copyright © 2001 - 2007 SILC Project SILC Project Website | SILC Toolkit Reference Manual Index