[pmapper-users] encoding

2010-03-16 Thread Fco . Javier García Ricca
I forget the subject, sorry¡

-- Forwarded message --
From: Fco. Javier García Ricca 
Date: 2010/3/15
Subject: [pmapper-users] (no subject)
To: pmapper-users@lists.sourceforge.net


Hi,

I have some problems with codification. When I define the defaultCharset as
UTF-8 the layer's names displays the accents with strange character.However,
If I define the defaultCharset as ISO-8859-1 then the messages of the
tools display the same error. The "no records found" message is incorrect
too in this case


Thanks
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


[Pmapper-users] Encoding in pmapper-1.2.0

2006-05-05 Thread Armin Burger

> So I can perform the translation of map file strings in language_xx.php
> file now? How is it done? Do I just set:
> 
> $_sl["my_string"] = "my_translation";
> 
> in my language_xx.php file? 

yes, this is how it works since 1.2. (and note that language_xx.php has to
be encoded then in UTF8, so you need a text editor supporting Unicode).
Before 1.2, the annotations for all languages had to be in the map file
separated with '|'. 


> 
> That is OK too, but since my map file can be pretty large, I would like 
> to try the other approach too. So we can use iconv() function instead of
> utf8_encode and define additional parameter for mapfile encoding right?
> 

you have to modify the calls of 'utf8_encode()' to 'iconv()' in
initgroups.php for that. I will add this as necessary modification for the
next release.


armin



-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



[Pmapper-users] Encoding in pmapper-1.2.0

2006-05-05 Thread Gambin Dejan
Thanks Armin,

So I can perform the translation of map file strings in language_xx.php file 
now? How is it done? Do I just set:

$_sl["my_string"] = "my_translation";

in my language_xx.php file? 

That is OK too, but since my map file can be pretty large, I would like to try 
the other approach too. So we can use iconv() function instead of utf8_encode 
and define additional parameter for mapfile encoding right?

I can do it if you want, no problems.

thanks, dejan

> -Original Message-
> From: Armin Burger [mailto:armin.burger at gmx.net] 
> Sent: Thursday, May 04, 2006 4:25 PM
> To: Gambin Dejan
> Cc: pmapper-users at faunalia.it
> Subject: Re: [Pmapper-users] Encoding in pmapper-1.2.0
> 
> 
> Dejan,
> 
> originally I wanted also the map file to be in UTF-8. I just 
> got errors that crashed the PHP process when doing so. So I 
> still kept the map file in LATIN1 and used utf8_encode to put 
> everything to UTF8. 
> 
> You can try to put the map file in Unicode (having 
> map2unicode=0) and see if it works for you. You need an 
> editor that supports UTF (I use Scite). A solution that 
> should work is to use ascii characters in the map file and 
> add the strings to the language_xx.php file (they have to be in UTF).
> 
> I have been thinking that this mentioned encoding does not 
> require PHP to have libiconv be compiled in, because the 
> (incomplete) PHP docs do not say anything like that. But in 
> fact, libiconv is required for utf8_encode. So in this case I 
> can as well use the more flexible 'iconv()' that allows to 
> define in and out encoding. That would also solve your 
> problem. One then needs to have a Metadata tag specifying the 
> encoding of the map file.
> 
> I guess that I have to go the more strict way and require 
> iconv to be compiled into PHP when using anything else than 
> ASCII. Maybe Latin1 will also work.
> 
> LAYER_ENCODING will probably have to be the same as ENCODING 
> (but that is defined just in case of labels).
> 
> I would not try to use pmapper in anything else than UTF8 or 
> Latin1, you will very likely end up in unresolved encoding errors.
> 
> armin
> 
>
> 
> > --- Urspr?ngliche Nachricht ---
> > Von: "Gambin Dejan" 
> > An: 
> > Betreff: [Pmapper-users] Encoding in pmapper-1.2.0
> > Datum: Thu, 4 May 2006 13:56:51 +0200
> > 
> > Hi,
> > 
> > I have some questions regarding the "new" multilingual 
> interface and 
> > encoding.
> > 
> > The documentation says the default character encoding is 
> UTF-8. This 
> > is defined through defCharset parameter in config.ini I 
> suppose (I can 
> > see it is only used in common.php for header building).
> > 
> > First, for the map file, what if I have DESCRIPTION or 
> CLASS names in 
> > some other encoding? If I understand correctly, I can use 
> > map2unicode=1. But this causes using utf8_encode function and this 
> > function encodes the string to UTF-8 but it assumes the 
> input string 
> > is in latin1 (ISO8859-1). So if my map file is using the encoding 
> > different from ISO-8859-1, this will not work correctly? 
> For example 
> > we are using ISO-8859-2 or win-1250 encodings. What is the 
> best way to 
> > correctly display my DESCRIPTION and CLASS names if they 
> contain some 
> > special Croatian characters? I suppose I can't edit map file using 
> > UTF-8 encoding?
> > 
> > Second, for query results, is the LAYER_ENCODING metadata parameter 
> > somehow related to label ENCODING parameter in mapfile?
> > 
> > Third, what if I want to use some other defCharset? What is 
> the best 
> > way to go? At this moment I have an older pmapper version 
> that I had 
> > to modify for correctly work with my data (I a displaying 
> data on HTML 
> > page in ISO-8859-2, but my dbf shape files have data in WIN-1250). 
> > What do you suggest?
> > 
> > I think it would be the best to use UTF-8 for HTML displaying, with 
> > LAYER_ENCODING for correct queryingso only thing left to do is 
> > displaying some strings with special characters from the map file...
> > 
> > thanks very much
> > 
> > dejan
> > 
> > ___
> > Pmapper-users mailing list
> > Pmapper-users at faunalia.it 
> > http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
> > 
> 
> -- 
> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> 



[Pmapper-users] Encoding in pmapper-1.2.0

2006-05-04 Thread Armin Burger
Dejan,

originally I wanted also the map file to be in UTF-8. I just got errors that
crashed the PHP process when doing so. So I still kept the map file in
LATIN1 and used utf8_encode to put everything to UTF8. 

You can try to put the map file in Unicode (having map2unicode=0) and see if
it works for you. You need an editor that supports UTF (I use Scite). A
solution that should work is to use ascii characters in the map file and add
the strings to the language_xx.php file (they have to be in UTF).

I have been thinking that this mentioned encoding does not require PHP to
have libiconv be compiled in, because the (incomplete) PHP docs do not say
anything like that. But in fact, libiconv is required for utf8_encode. So in
this case I can as well use the more flexible 'iconv()' that allows to
define in and out encoding. That would also solve your problem. One then
needs to have a Metadata tag specifying the encoding of the map file.

I guess that I have to go the more strict way and require iconv to be
compiled into PHP when using anything else than ASCII. Maybe Latin1 will
also work.

LAYER_ENCODING will probably have to be the same as ENCODING (but that is
defined just in case of labels).

I would not try to use pmapper in anything else than UTF8 or Latin1, you
will very likely end up in unresolved encoding errors.

armin

   

> --- Urspr?ngliche Nachricht ---
> Von: "Gambin Dejan" 
> An: 
> Betreff: [Pmapper-users] Encoding in pmapper-1.2.0
> Datum: Thu, 4 May 2006 13:56:51 +0200
> 
> Hi,
> 
> I have some questions regarding the "new" multilingual interface and
> encoding.
> 
> The documentation says the default character encoding is UTF-8. This is
> defined through defCharset parameter in config.ini I suppose (I can see
> it is only used in common.php for header building). 
> 
> First, for the map file, what if I have DESCRIPTION or CLASS names in
> some other encoding? If I understand correctly, I can use map2unicode=1.
> But this causes using utf8_encode function and this function encodes the
> string to UTF-8 but it assumes the input string is in latin1
> (ISO8859-1). So if my map file is using the encoding different from
> ISO-8859-1, this will not work correctly? For example we are using
> ISO-8859-2 or win-1250 encodings. What is the best way to correctly
> display my DESCRIPTION and CLASS names if they contain some special
> Croatian characters? I suppose I can't edit map file using UTF-8
> encoding?
> 
> Second, for query results, is the LAYER_ENCODING metadata parameter
> somehow related to label ENCODING parameter in mapfile?
> 
> Third, what if I want to use some other defCharset? What is the best way
> to go? At this moment I have an older pmapper version that I had to
> modify for correctly work with my data (I a displaying data on HTML page
> in ISO-8859-2, but my dbf shape files have data in WIN-1250). What do
> you suggest?
> 
> I think it would be the best to use UTF-8 for HTML displaying, with
> LAYER_ENCODING for correct queryingso only thing left to do is
> displaying some strings with special characters from the map file...
> 
> thanks very much
> 
> dejan
> 
> ___
> Pmapper-users mailing list
> Pmapper-users at faunalia.it
> http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
> 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



[Pmapper-users] Encoding in pmapper-1.2.0

2006-05-04 Thread Gambin Dejan
Hi,

I have some questions regarding the "new" multilingual interface and
encoding.

The documentation says the default character encoding is UTF-8. This is
defined through defCharset parameter in config.ini I suppose (I can see
it is only used in common.php for header building). 

First, for the map file, what if I have DESCRIPTION or CLASS names in
some other encoding? If I understand correctly, I can use map2unicode=1.
But this causes using utf8_encode function and this function encodes the
string to UTF-8 but it assumes the input string is in latin1
(ISO8859-1). So if my map file is using the encoding different from
ISO-8859-1, this will not work correctly? For example we are using
ISO-8859-2 or win-1250 encodings. What is the best way to correctly
display my DESCRIPTION and CLASS names if they contain some special
Croatian characters? I suppose I can't edit map file using UTF-8
encoding?

Second, for query results, is the LAYER_ENCODING metadata parameter
somehow related to label ENCODING parameter in mapfile?

Third, what if I want to use some other defCharset? What is the best way
to go? At this moment I have an older pmapper version that I had to
modify for correctly work with my data (I a displaying data on HTML page
in ISO-8859-2, but my dbf shape files have data in WIN-1250). What do
you suggest?

I think it would be the best to use UTF-8 for HTML displaying, with
LAYER_ENCODING for correct queryingso only thing left to do is
displaying some strings with special characters from the map file...

thanks very much

dejan