Send Netdot-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."
Today's Topics:
1. [Netdot - Bug #1760] UTF-8 data retrivied from database
breaks UTF-8 content of the page ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sat, 1 Jun 2013 18:23:15 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1760] UTF-8 data retrivied from
database breaks UTF-8 content of the page
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1760 has been updated by Andrew Kornilov.
It seem that "use utf8;" in each template/form solves the problem.
Checking right now, will let you know the results.
----------------------------------------
Bug #1760: UTF-8 data retrivied from database breaks UTF-8 content of the page
https://osl.uoregon.edu/redmine/issues/1760#change-3082
Author: Andrew Kornilov
Status: New
Priority: Normal
Assignee:
Category: Netdot
Target version: 1.0.5
Resolution:
Hi there,
We like Netdot very much and want it to be used all around the world. There are
many small ISP companies (and we are one of them) in Russia and they can't use
Netdot with English language. Unfortunately, Netdot doesn't provide anything
like GNU gettext support so we had to start translation right inside the code
and page templates. Furthermore, all our sites, cables, addresses and so on are
in Russian.
Unfortunately, we've found some strange problems: some pages are displayed like
double UTF8 encoded.
Here is the example how it looks like: http://imagebin.org/259678
After discovering i found that this happens in this block of code:
htdocs/cable_plant/autohandler (lines 180-184):
<%perl>
foreach my $site (@sites) {
printf("<option value=\"%s\">%s</option>\n", $site->id,
$site->name);
}
</%perl>
Next step showed that removing Russian site names from output solves the
problem, now it looks like this:
http://imagebin.org/259680
I tried to UTF8 encode retrieved data:
my $site_name = Encode::encode_utf8($site->name);
printf("<option value=\"%s\">%s</option>\n", $site->id, $site_name);
and that solved the problem!
That happens on every page that uses data retrieved from database. So it seems
that Netdot doesn't encode data from database to UTF8 and outputs it in way
that breaks the page.
Could you please take a look into the database code and find what causes that?
We do not want to UTF8-encode each data in every HTML template and so on, so
it's better to make some changes to DB util code to make it work everywhere.
Thank you in advance.
P.S. We use GIT, track last changes of the original Netdot, patch it with
Russian lagnuange and publish it so everyone can use it.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 75, Issue 2
*******************************************