Store Rich Text in DATA Base
-
Hello, i use ajax, HtmlEditorExtender to let users writing their own description i store in database, and in my database i can see properly data store in table like this :
'๐ธ๐ค DANCE SQUARE ๐ค๐ธ\n๐ LA TRILOGIE :\n3 dates ร ne surtout pas manquer\n.\n๐งโพ๏ธ 29 Octobre - LA'
but when i read data by sql, in string variable, i lose all the specials characters like hearts in my example, all specials characters are replace by ? what should i do to keep specials characters ? (correctly store in database.) i read like this :
if (!res.IsDBNull(i))
ss {
return res.GetString(i);
}
else
{
return string.Empty;
} -
Hello, i use ajax, HtmlEditorExtender to let users writing their own description i store in database, and in my database i can see properly data store in table like this :
'๐ธ๐ค DANCE SQUARE ๐ค๐ธ\n๐ LA TRILOGIE :\n3 dates ร ne surtout pas manquer\n.\n๐งโพ๏ธ 29 Octobre - LA'
but when i read data by sql, in string variable, i lose all the specials characters like hearts in my example, all specials characters are replace by ? what should i do to keep specials characters ? (correctly store in database.) i read like this :
if (!res.IsDBNull(i))
ss {
return res.GetString(i);
}
else
{
return string.Empty;
}Even money's on this (NOUS VOYON (sp?)): CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; A blind man could probably use GOOGLE to find this but ... I haven't got a blind man's machine so this is a conjecture on my part. (Un aveugle pourrait probablement utiliser GOOGLE pour trouver cela mais ... je n'ai pas de machine pour aveugle, donc c'est une conjecture de ma part.)
-
Even money's on this (NOUS VOYON (sp?)): CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; A blind man could probably use GOOGLE to find this but ... I haven't got a blind man's machine so this is a conjecture on my part. (Un aveugle pourrait probablement utiliser GOOGLE pour trouver cela mais ... je n'ai pas de machine pour aveugle, donc c'est une conjecture de ma part.)
-
Hello, i use ajax, HtmlEditorExtender to let users writing their own description i store in database, and in my database i can see properly data store in table like this :
'๐ธ๐ค DANCE SQUARE ๐ค๐ธ\n๐ LA TRILOGIE :\n3 dates ร ne surtout pas manquer\n.\n๐งโพ๏ธ 29 Octobre - LA'
but when i read data by sql, in string variable, i lose all the specials characters like hearts in my example, all specials characters are replace by ? what should i do to keep specials characters ? (correctly store in database.) i read like this :
if (!res.IsDBNull(i))
ss {
return res.GetString(i);
}
else
{
return string.Empty;
}Probably your data is Unicode or UTF-8. I am not an expert on such things but you should ensure the data is being processed approriately. One possibility is the font being used. The data might be just fine but if you are not using a font that supports Unicode or UTF-8 (whatever is relevant) then you won't see it correctly. However the "\n" implies it is something else. That character is the carriage return, such as the Enter key in the keyboard. Note that Rich Text is not the same as HTML. The formats are very different.