Subject | getByte('UTF-8').length |
---|---|
Author | Łukasz Bączek |
Post date | 2014-05-15T15:02:15Z |
Hello
I write in Java one thing and needs to check if the data word, eg
"Warszawa" includes storage space encoded as UTF8
I started googling for this and found something like this
String s = "Warsaw"
s.getByte ('UTF-8'). length - returns me probably 7 bytes
I have a field in a table (base Firebird)
declared in this way
"KOD" VARCHAR (6)
IBExpert multiplies the size of the VARCHAR * 4
So I am also downloading this value multiplied by four what would have
gave it (24 bytes), but my thinking here is probably incorrect and
should not multiply this value by 4 because Firebird me screams that
does not fit.
and here a question for you which value should be taken into account
because it multiplied like so it means that something kicked while
getting the size in bytes of UTF8?
Regards
I write in Java one thing and needs to check if the data word, eg
"Warszawa" includes storage space encoded as UTF8
I started googling for this and found something like this
String s = "Warsaw"
s.getByte ('UTF-8'). length - returns me probably 7 bytes
I have a field in a table (base Firebird)
declared in this way
"KOD" VARCHAR (6)
IBExpert multiplies the size of the VARCHAR * 4
So I am also downloading this value multiplied by four what would have
gave it (24 bytes), but my thinking here is probably incorrect and
should not multiply this value by 4 because Firebird me screams that
does not fit.
and here a question for you which value should be taken into account
because it multiplied like so it means that something kicked while
getting the size in bytes of UTF8?
Regards