Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: charsets dosen't properly work after upgrading  (Read 18566 times)

0 Members and 2 Guests are viewing this topic.

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
charsets dosen't properly work after upgrading
« on: October 19, 2009, 10:17:50 pm »

First - I know that is recomended to use utf-8 but ... my gallery is connected with other databses and pages by thousands of links, and after lots of testing I decided to use iso-8859-2

It worked properly on1.4.18 version but after uprgading to 1.4.25 all frazes form language files doesn't display properly special national characters "ąóść..."

User text are OK. Problem is only with language files texts.

I swich in "admin" file language to iso-8859-2, and also gives the same on the begining of language file - NO RESULT
Adter sweching in admin file to utf-8 looks OK (but user text are scrambled)

I thought about change whole gallery to utf-8 but charsetmgr.php doesn't work  - 1.step (checking) gives no result - blank page.

My gallery
version 1.4.25

ps. there is similar topic on support forum, but about older version
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: charsets dosen't properly work after upgrading
« Reply #1 on: October 20, 2009, 07:51:48 am »

there is similar topic on support forum, but about older version
All versions of the cpg1.4.x family are the same in this aspect, so if there are other threads that refer to older versions of the cpg1.4.x family than the current cpg1.4.25, they still apply, as there have been no new features since the initial release of the cpg1.4.x series. You should have refered to the threads you already have read.

First - I know that is recomended to use utf-8 but ... my gallery is connected with other databses and pages by thousands of links, and after lots of testing I decided to use iso-8859-2
I already answered your other thread before seing this one, so this might overlap: yes, it was a bad move to switch from utf-8 to anything else. And basically, you're on your own with this.

User text are OK. Problem is only with language files texts.
You can not just switch encoding around easily once you have textual content in your database. I'm pretty sure that there are other threads that explain how to convert the textual content of the database from a proprietary encoding back to the recommended encoding utf-8. I'm not ready to come up with the instructions again, as they are far from trivial.

It worked properly on1.4.18 version but after uprgading to 1.4.25 all frazes form language files doesn't display properly special national characters "ąóść..."
If the issue happened while upgrading you should have posted that in the proper sub-board, don't you agree? I have moved your thread around accordingly. Can't replicate your issues though.

all frazes form language files doesn't display properly special national characters "ąóść..."
Post a deep link or show us a screenshot. As far as I can see your menu entries display as expected in Polish.
Logged

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #2 on: October 20, 2009, 10:20:13 am »

Menu now looked properly but it is just look.
I had to convert whole polish.php file in code. (whole except bbcode help text)

f.e.
Code: [Select]
a  -   ą
ć - ć
ę - ę
etc.

all numbers are shown on wiki page i line "Unicode

I think, that "$lang_charset" doesn't work properly - because any changing there has no effect.

ps. I wryly tried to search for help in conversion - and I found no treads at all.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: charsets dosen't properly work after upgrading
« Reply #3 on: October 20, 2009, 04:42:15 pm »

No, you didn't have to convert that file. That's what I said. You're drawing the wrong conclusions. No need to lecture us about named HTML entities - we're aware of them. If it got necessary for you to convert the encoding of a coppermine core file you must have made a mistake.
Logged

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #4 on: October 20, 2009, 05:30:32 pm »

look - I've wryly tried to have wright effect. I used $lang_charset = utf-8 or iso-8859-2 or other, also saving file in different conversion - each of this action gives wrong effect or no effect at all. menu text are always taking by system as unicode, no matter what I wrote on the biggining of poilsh.php (in administrator tools I have iso-8859-2, menu text looked correctly when I use there utf-8 but of course description of file and albums looks bad then)

Therefore only way to have right effect was to CONVERT whole texts in polish.php to HTML entities. I know - that it isn't good solution, but I have no idea haw to do it well. I thought that support forum is for support people who has problem, not to kick them every time when they don't know something.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: charsets dosen't properly work after upgrading
« Reply #5 on: October 20, 2009, 06:11:15 pm »

Your theme and also your Classic theme returns this before the <head>.

Code: [Select]
<html dir="ltr">
This does not validate properly. I am not sure if it is the cause of your problem, but the suggestion from here is to return to your template.html(s) the line which is more "standard" to Coppermine version 1.4.25.

Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">(from Sample or Classic themes)

Again, I am not sure if it will fix your problem - but it did not look right.

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #6 on: October 20, 2009, 06:43:03 pm »

Tnak you for help
This become from language (polish.php) file. This is - I believe standard for1.4.25 version and hes explanation
"$lang_text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left)"
I believe that is option for arabian laganguages
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: charsets dosen't properly work after upgrading
« Reply #7 on: October 20, 2009, 07:26:00 pm »

This does not come from the polish language file. It comes from your template, exactly as Joe suggested. Edit that file with a plain text editor and replace
Code: [Select]
<html dir="{LANG_DIR}">with
Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">.
Review your attitude!
Logged

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #8 on: October 20, 2009, 08:43:59 pm »

What was wrong with atitude in my last post Joachim?

I did change in my themes file as you suggested. And "<html dir="ltr">" - look still the same
fotogallery, classic, and sample

(but it was not my point - I just did what you suggest)

problem still egsist
Logged

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #9 on: October 20, 2009, 08:53:19 pm »

och - I am sorry - i did change in backup dirrectory
ltr-fraze is right

but problem still egsist
for checking I place letter (ą) after note of number of pictures, an pageviews - it should be recognized for you - just above pictures - For not it is seen (Ä�) - and no matter what charset I order in poslih.php
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: charsets dosen't properly work after upgrading
« Reply #10 on: October 21, 2009, 09:19:51 am »

What was wrong with atitude in my last post Joachim?
You're lecturing us about how the application we provide is working, e.g. by telling us what the dir attribute of the html tag is used for: we're aware of what that attribute does and why we coded it the way we coded it.

Your site is still using the proprietary encoding that we do not recommend nor support, so every issue you have that is related to using that encoding is entirely your own fault and up to you to fix, as you appear to be immune against advice.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: charsets dosen't properly work after upgrading
« Reply #12 on: October 21, 2009, 04:39:41 pm »

OT: Excellent article Joachim.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #13 on: October 22, 2009, 02:36:32 pm »

I agree

But - utf-8 DID NOT give me full possibility what I need (mayby now is better). Espiecially - searching link with polish doesn't work.

I DO believe that utf-8 is the best charset ever made, and I KNOW that i SHOULD use it

Bu - since you give option/possibility to use other charsets - I am asking just about help of it.
I you don't want give me any suppeort why you leave this option for people at all?

I believe that problem is with simple line code which propably don't takes demanding charset form polish.php (I think so - because any change there gives no result)

I believe that is possible to work with other charsets properly. And I am asking of that help - HAW to make the line in polish.php working?!?!?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: charsets dosen't properly work after upgrading
« Reply #14 on: October 22, 2009, 07:04:43 pm »

utf-8 is not a charset. Seems like you haven't read the article I have refered to.
Logged

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #15 on: October 22, 2009, 07:53:29 pm »

sorry for my english - I just change utf-8 for iso-8859-2 No metter what is the name in english of it)  - in Config file it is "Character encoding"
It should work but doesn't

BTW if it is not charset why in all language file  is "$lang_charset = 'utf-8';" ????
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: charsets dosen't properly work after upgrading
« Reply #16 on: October 22, 2009, 09:42:54 pm »

BTW if it is not charset why in all language file  is "$lang_charset = 'utf-8';" ????

Why keep arguing with the experts? If it read "$lang_encoding would you then understand?

     ########

You seemed to have caused the trouble yourself.

It worked properly on1.4.18 version

Then we see.....

i did change in backup dirrectory

From the help menu in Language & Charset settings

Quote
Once you have added comments or files to your gallery, you should not change the character set of your gallery

Try some of the basic things: review your edits and changes, your backups and also how you make edits to your files (make sure you save all cpg files as UTF-8 without B.O.M.)

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #17 on: October 23, 2009, 08:19:32 am »

Quote
Try some of the basic things: review your edits and changes, your backups and also how you make edits to your files (make sure you save all cpg files as UTF-8 without B.O.M.)

Yes - I had done this all before I wrote the topic. Few times. I edit files in Notepad++ (UTF-8 without B.O.M. - simple notepad with colored).

I did only few small changes (I marked them all every time)
* in config  for iso-8859-2
* trying new $lang-charset - change for iso... also, and changed back for utf-8.
* extra lines in menu,
* two plugins (user description text displayed, and Captcha plugin).
* change back displaying links [ url ]
* give possibility to display right bb-code help file in html. (by allowed < and >)
* few extra function of private bb-code.
* in search inc.php  ______ $type = $_POST['type'] == 'AND' ? " AND " : " OR ";  ___ for ___ $type = $_REQUEST['type'] == 'AND' ? " AND " : " OR ";
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: charsets dosen't properly work after upgrading
« Reply #18 on: October 23, 2009, 09:55:03 am »

Stop the nonsense now, will ya? You seem to be immune against advice, so drop it. If you want our advice, then get a vanilla polish language file (in utf-8) and don't convert nor transmogrify it. After that, convert the textual content of the database tables of your coppermine gallery from iso-whatever to utf-8 (remember to back up evereything before you try) using the corresponding converter.
If you decide not to do exactly I said above, then please stop molesting us with your remarks. You're on your own then.
Logged

okiem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: charsets dosen't properly work after upgrading
« Reply #19 on: October 23, 2009, 10:10:21 am »

as I sad - I also try to do it (translate whole database to utf-8) but charsetmgr.php doesn't work stoping on the 1 step. I tried to look for solution on this forum - but I couldn't find.

please don't be so rude - I always gently asking for help, doing whatever I can, and in each replay recive lashing from you.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.