Changes between Version 13 and Version 14 of UnicodeBranch


Ignore:
Timestamp:
05/16/07 18:20:44 (8 years ago)
Author:
Flavio Curella <flavio.curella@…>
Comment:

fixed a typo

Legend:

Unmodified
Added
Removed
Modified
  • UnicodeBranch

    v13 v14  
    8585 * Field sizes for text fields such as !TextField and !CharField are specified in terms of characters, not the number of bytes used in the encoding in the database. All databases supported by Django can handle this (i.e. their ''VARCHAR'' fields are sized in terms of characaters and can store unicode characters). So you do '''not''' need to worry about how many bytes the encoded version of your data will take up when working with lengths.
    8686
    87  * You might find the functions {{{django.utils.encoding.smart_string()}}} and {{{dhango.utils.encoding.smart_unicode()}}} useful in your application code. Particularly the latter is handy: it takes a bytestring or unicode string and returns a unicode string. It also knows to convert objects with a {{{__unicode___}}} or {{{__str__}}} method into unicode strings. So if you have a string that is either a bytestring or unicode and you wish to make it uniform -- always a unicode string -- call {{{smart_unicode()}}} on the object.
     87 * You might find the functions {{{django.utils.encoding.smart_string()}}} and {{{django.utils.encoding.smart_unicode()}}} useful in your application code. Particularly the latter is handy: it takes a bytestring or unicode string and returns a unicode string. It also knows to convert objects with a {{{__unicode___}}} or {{{__str__}}} method into unicode strings. So if you have a string that is either a bytestring or unicode and you wish to make it uniform -- always a unicode string -- call {{{smart_unicode()}}} on the object.
    8888
    8989=== Databases ===
Back to Top