Displaying 2 results from an estimated 2 matches for "utf8_valu".
Did you mean:
utf8_value
2008 Jul 17
3
Convert data to utf-8
Hello, I''m trying to find a solution to convert everything returned by
mechanize to utf-8, no matter if the original page is utf-8 or iso and I
really don''t know where to start from...
agent = WWW::Mechanize.new { |a| a.log =
Logger.new(File::join(RAILS_ROOT, "log/mechanize.log")) }
one_page = agent.get("www.google.fr")
My first problem is that one_page
2001 Sep 30
3
UTF-8 stuff
...t structure. Error checking is performed.
Note that this assumes a null-terminated string, which may cause
@@ -205,7 +204,7 @@
***********/
-int add_comment(char *line, vorbis_comment *vc, char *encoding)
+int add_comment(char *line, vorbis_comment *vc)
{
char *mark, *value, *utf8_value;
@@ -234,7 +233,7 @@
value++;
/* convert the value from the native charset to UTF-8 */
- if (utf8_encode(value, &utf8_value, encoding) == 0) {
+ if (convert_to_utf8(value, &utf8_value) >= 0) {
/* append the comment and return */...