skp_999 wrote:
>> So you want to store URLs encoded in utf-8 and you don't know what
>> encoding to store them in...?
> 
> I need to store IRIs (very loosely speaking, a URI that can contain
> Unicode characters). My question is: should I store them in a UTF-8
> field or convert them from IRI to URI and then store them in a ASCII
> field? Which is better (note that I can always perform a URI->IRI
> conversion)?

Better how? CPU performance? memory usage? database-dump readability?
backwards compatibility with old database systems? If any of the former
two are among the reasons: it's a non-issue. The rest should be
self-explanatory.

>> Also, _ci means case insensitive, which URLs are not.
> 
> 'ci' means case insensitive when I perform a *search* on my db

Unless you plan on just storing the data and never retrieving it I would
consider that a pretty important factor. The sole reason for specifying
an encoding in the first place is to let the database make sense of the
data at all. If you are never going to do any operation on this field
(as you are insinuating) then you might just as well store it in a BLOB.

>> Don't suddenly output tag attributes in a different encoding than the
>> rest of the page...
> 
> My page charset is utf-8. My question is: should I print my HREFs in
> utf-8 or in encoded ASCII ?

This makes no sense---what would "decoded" ASCII be? Only code points
from 0 to 127? Because that's the only way I can understand this
question: "should I translate all non-ASCII code-points to escape
sequences?" in which case the answer is the same as above: totally
depends on what you are going to do with it.

> tnx

Good luck,

b^4

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to