vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

satlazone 10-17-2011 06:16 PM

Quote:

Originally Posted by satlazone (Post 2256488)
I am having a little problem with encoding.
All goes fine but when I replace "My Page Title" with some Hebrew words I receive the following characters instead: ���� ����� ���� ���

UTF-8 encoding.

any attention? thanks.

Lynne 10-18-2011 04:29 PM

You are entering Hebrew words into the template and ending up with those characters? How about a link to your page.

satlazone 10-18-2011 07:36 PM

Adding Hebrew words into my template will not end up with those characters.
Adding Hebrew words into the php file where I have to replace "My Page Title" with my own title description will end up with those characters.
link

kh99 10-19-2011 02:22 AM

Quote:

Originally Posted by satlazone (Post 2256488)
UTF-8 encoding.

Do you mean you have your site configured for UTF-8 encoding?

Someone was having a similar problem recently, and the solution was to call utf8_decode() on the string.

sivaganeshk 10-19-2011 02:21 PM

A sample video in creating php page - http://www.youtube.com/watch?v=jK3738agsg4

satlazone 10-20-2011 02:44 PM

Quote:

Originally Posted by kh99 (Post 2258820)
Do you mean you have your site configured for UTF-8 encoding?

Someone was having a similar problem recently, and the solution was to call utf8_decode() on the string.

I did try what you have said, characters where changed to question marks instead.
I have changed this line

Code:

$templater->register('pagetitle', $pagetitle);
to

Code:

$templater->register('pagetitle', utf8_decode($pagetitle));

Any other suggestions? :/

kh99 10-20-2011 08:21 PM

Quote:

Originally Posted by satlazone (Post 2259359)
Any other suggestions? :/

OK, well, it's clearly some kind of encoding issue. I found this in the php manual: http://www.php.net/manual/en/language.types.string.php

Quote:

Given that PHP does not dictate a specific encoding for strings, one might wonder how string literals are encoded. For instance, is the string "?" equivalent to "\xE1" (ISO-8859-1), "\xC3\xA1" (UTF-8, C form), "\x61\xCC\x81" (UTF-8, D form) or any other possible representation? The answer is that string will be encoded in whatever fashion it is encoded in the script file.
So do you happen to know how your script files are encoded (like what your OS or editor default encoding is, I guess). And how do you have your vb configured?

Or I suppose we could take another guess and try utf8_encode(). :)

RetroDreams 10-20-2011 09:46 PM

Very helpful... thanks a million!

dany_danay 10-23-2011 02:26 PM

The page is blank... www.foro-ptc.com/test.php

sivaganeshk 10-23-2011 02:34 PM

@dany : check this video http://www.youtube.com/watch?v=jK3738agsg4
hope it helps you.


All times are GMT. The time now is 11:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02098 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete