Using Cyrillic Letters

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

may be someone could help me ?
i need to use cyrillic letters in a php application.

I changed everything to UTF-8 and it works fine. The only problem are


and others... :-(

What have i done:
- Changed Header to UTF-8
- Changed forms to accept-charset="utf-8"
- Changed Mysql tables to UTF-8

Anyone have an idea ?

Best regards


Re: Using Cyrillic Letters wrote:
Quoted text here. Click to load it

My advise is to find a solution to the problem that you're
encountering, and then apply it.

Re: Using Cyrillic Letters

thanks for your answer... hopefully you never need some help.... back
to my problem:

The curious thing is, that it works for nearly all characters, but not
for the cyrillic small letters... may be there is some UTF-8 limitation
in php ?

Re: Using Cyrillic Letters wrote:
Quoted text here. Click to load it


First of all, please quote the message you're replying to.  In order to see your  
reply I had to go back and change options - by default I don't display messages  
I've already read.

Now - I didn't respond earlier because I was hoping someone would give you some  
*real* assistance.  I'm not at all familiar with the Cyrillic alphabet, but I'll  

I don't know of any reason you should have problems with displaying these  
characters in PHP.  However, PHP support for utf-8 has been a bit problematic.

First thing - can you show these characters as static HTML?  If not, the problem  
is neither PHP nor MySQL.

If you can, can you echo them from your PHP script to the page and have them  
come out correctly?

It's a place to start, anyway.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Using Cyrillic Letters wrote:
Quoted text here. Click to load it

I was throwing you a hint--perhaps too sarcastically--to provide more
information. Saying something "doesn't work" is hardly adequate.
Peculiar problems usually arise from peculiar circumstances. What
exactly does you code do and what exactly is happening?

I work a lot with foreign scripts i sam mnogo let nazad pochilsja
russkij jazyk, so I know a thing or two about Cyrillic. I can confirm
that there is nothing inherent in PHP that would suppress lowercase
Cyrillic letters. Without more information it's hard to say more.

UTF-8 is somewhat of a pain on PHP. It's easier to just use KOI8-r or

Problems trying to call functions in one file from another

I'm having great difficulty grasping something which I think is probably

Is it possible to call a function in a php file, from another function that
is in a php file, in a completely different directory?

(But wait, it's not that simple. ;-)

In other words, say I have a function:

file path:   root/level2/level2.php

function dosomethinglevel2()
    //do it

Now, let's say this file has a bunch of code in it and a bunch of functions
and includes multiple other files in it. In fact, there's a whole batch of
.php files in /level2/ that all call each other and include each other.

Then, let's say I have another php file inside the upper level folder,
root/level1.php, and a function in it:

function callexternalfunction()
    dosomethinglevel2();    // call function in another directory

However, I can't call the function because it gives an error that it's
undefined. And then, if I include the file that the function is defined in:


I get a bunch of other errors because all of the files that that file
includes are not in the correct paths anymore.

Is there some other way to include external functions, something like
prototypes in C/C++?

The only way I've been able to get this to work is to use curl in the upper
level file to call the function in the level2 folder and pass it the
parameters that I want ("GET"), but this seems horribly kludgey.

I'm not sure if that's clear, but maybe somebody knows what I'm talking
about - thanks!

Stephen Kay

Re: Problems trying to call functions in one file from another


        mysql_query("SET NAMES 'utf8'");
        mysql_query("SET CHARACTER SET 'utf8'");
by each connection..

Site Timeline