HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


PHP WARNING - charset `utf-8 ' not supported

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#105860 (In Topic #20654)
alf
Avatar

Fan in action

Error saving modified welcoma page (or any other)

Hi
New on this software, learning to use it.

I got this error after after modifing the welcome message (just change some plain text)

" PHP WARNING [2] html_entity_decode() [<a href='http://www.php.net/manual/en/function.html-entity-decode.php'>function.html-entity-decode.php</a>]: charset `utf-8 ' not supported, assuming iso-8859-1 in sources/comcode_from_html.php on line 242 (version: 9.0.16, PHP version: 5.3.29, URL: /ocp/cms/index.php?page=cms_comcode_pages&type=__ed&wide=1) "

Any help will be apreciated.

Ruben

Attachment
complete error message
» Download: Error_modifing_welcome_page.tar.gz (333 Kb, 110 downloads so far)
Back to the top
 
Posted
Rating:
#105865
Avatar

It's utf8 not utf-8


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105866
Avatar

Actually, no it's not, you were right (I always get mixed up, MySQL uses utf8, but everything else uses utf-8). Hang on, this is weird, I'll look into it…


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105868
Avatar

Check to see if perhaps you accidentally added a space after the character set name.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105873
alf
Avatar

Fan in action

thanks for answering

no spaces
                global-es.po
#: [strings]charset
msgid "ISO-8859-1"
msgstr "utf-8"

                 global.ini
[strings]
charset=utf-8
Back to the top
 
Posted
Rating:
#105874
Avatar

You said "no spaces", but absolutely there is a space on the global.ini setting there (on the end of the line), and inside the error message.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105876
Avatar

Of course, it is possible you just typed it accidentally in the editor ;). But it is definitely in your post, if you highlight the line you can see the space on the end easily.

Do you want to open a free bug report ticket with hosting access details, so I can look direct on your site?

It looks like there is some confusion going on, because I can see we were also discussing utf-8 not coming into action.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105877
alf
Avatar

Fan in action

well I said "no spaces" inside the string
I did not care about spaces at the end of the line

Take it out and seems to work fine
I even got the accented vowels !!

I just tried to modify the welcome page again, sed the software was so clever to tell me that "the form is not saved" and  brought my modified unsaved text.
I only had to click save button to have the welcome words in spanish.
Very powefull
thanks a lot
Back to the top
 
Posted
Rating:
#105878
Avatar

Glad it's resolved :).

For the record, the next patch release will trim spaces. I want to make it as bullet proof as possible.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105882
alf
Avatar

Fan in action

The topic of this post is fixed in the sense I now can edit pages :) but I lost again my accented vowels  :(

That is commented in another thread on "Internationalisation/Spanish"

I will try to fix it, if I can't I will make a new post under "Internationalisation" because I feel the problem is with UTF (not spanish specific).

Actually, we don't need UTF because the 5 accented vowels does exist on the standard ascii set, but all the work done in translating is under utf. And once I get confortable with the software i plan to do an Esperanto site wich will need it.

Back to the top
 
Posted
Rating:
#105884
Avatar

If the accented vowels were prior to utf-8 being enabled, they wouldn't cary over. utf-8 is only compatible with character sets such as iso-8859-1 for characters 0-127
Decimal ASCII Chart


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105892
alf
Avatar

Fan in action

I understand that.
The problem is that when the language is changed to spanish it goes to ISO



I made a copy of the english folder to lang_custom and renamed it "ES" to see what hapend

Now I get charset utf-8 seted even when spanish is selected
Obviously something is wrong in the spanish translation

I am downloading a fresh copy from launchpad to say if it is wrong or I made some bad changes
I will post the results when it is done (asap)
Back to the top
 
Posted
Rating:
#105893
alf
Avatar

Fan in action

Now utf-8 is selected properly.
Sed I got
Un error ha ocurrido PHP NOTICE [8] unserialize() [<a href='http://www.php.net/manual/en/function.unserialize.php'>function.unserialize.php</a>]: Error at offset 264 of 268 bytes in sources/tempcode.php(1388) : eval()'d code on line 1 (version: 9.0.16, PHP version: 5.3.29, URL: /ocp/forum/index.php?page=forumview)

Attachment
php notice
» Download: php_notice.tar.gz (96 Kb, 112 downloads so far)

I'v got out of that error somehow (eble changing one of the next) but I am afraid to make arbitrary changes


Should this reference to "iso-8859" be changed to "utf-8"?

global_es.po said

#: [strings]charset
msgid "ISO-8859-1"
msgstr "ISO-8859-1"


Should these references to "en-GB" and "en_GB" be changed to "es"?

global_es.po said

#: [strings]locale
msgid "en-GB"
msgstr "en_GB"

#: [strings]dictionary
msgid "en_GB"
msgstr "en_GB"


Should these references to "izquierda" (left) and "derecha" (right) be erased?
Or changed to "left" and "right"?

global_es.po said

#: [strings]en_left
msgid "left"
msgstr "izquierda"

#: [strings]en_right
msgid "right"
msgstr "derecha"


Back to the top
 
Posted
Rating:
#105894
alf
Avatar

Fan in action

definitively

1- uploading the files from launchpad UNICODE chars looks fine, sed get PHP errors

2- adding ocp/lang_custom/es/GLOBAL.INI fix the PHP errors, sed can't set UNICODE
________

1a- deleting (or renaming) global.ini get instantly UNICODE chars, and get php errors (see social, admin zone)

2a- Again, adding ocp/lang_custom/es/global.ini no more php errors and no more unicode chars (no utf-8)
________

ando so on …


Notes:
1) Adding global.ini at ocp/lang_custom/EN/global.ini nothing change (that is utf ok, php errors)

2) The global.ini is the one installed by Utf8 addon

global.php-addon said

[descriptions]

[strings]
charset=utf-8

3) copying the long one from ocp/lang/EN/global.ini to ocp/lang_custom/ES nothing change (that is utf ok, php errors)
Back to the top
 
Posted
Rating:
#105901
Avatar

Right, there are 3 things at play here…

1) You should do a full pack download from launchpad. This is because it needs to be global.po, not global_es.po (which is the naming launchpad gives for a single download). global_es.po won't be recognised.

2) There's caching. When messing with individual files you may need to empty the language cache. Easiest way I find is to use /upgrader.php to do that (if you log in to it it has a clear caches option in there).

3) The unserialize is due to character sets affecting how PHP serialization works. It's a caching issue again. So follow the same as '2' above.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#105908
alf
Avatar

Fan in action

Finally it works !!  :lol:

May be you could add that step about renaming the files in the doc
ocPortal Tutorial: Translating ocPortal
between the following lines:

Translating ocPortal said


    Find all the files which end with the language code, ie. "-es.po" for Spanish or "-it.po" for Italian.
    Copy these into a folder named with the relevant language code, in capitals (for example "ES" for Spanish, "IT" for Italian, etc.).

I really appreciate your help
Ruben
Back to the top
 
Posted
Rating:
#105911
Avatar

We'll just be supporting the different naming scheme directly, in the next patch release.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: