Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7781749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:19:38+00:00 2026-06-01T19:19:38+00:00

I have a MySQL database with tables in ucs2_slovenian_ci encoding. I would like to

  • 0

I have a MySQL database with tables in ucs2_slovenian_ci encoding. I would like to write content of tables on utf-8 encoding webpage. So far I tried with:

mysql_set_charset ("utf-8");
mysql_query("SET NAMES 'utf-8'");
...
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
...
<?php echo utf8_encode($text); ?>
...

I’m still geting weird signs (question marks) instead of letters Š,Č,Ž
Nothing seems to work.

Weird thing is that with php command mysql_client_encoding($link) it says I have latin1 encoding. When I look page in Firefox it says UTF-8. What’s wrong?

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:19:40+00:00Added an answer on June 1, 2026 at 7:19 pm

    ucs2_slovenian_ci encoding

    That is not an encoding but a collation. A collation is the information on how something is sorted.

    For your website, this isn’t even of interest, because that’s what the database knows about itself – or better: the data stored in itself.

    For your website script’s it’s more important that you tell your database which encoding you need – here: UTF-8.

    You signal that the database server by specifying the database client encoding. Consult your database client driver manual how to specify that. It could be that:

    mysql_set_charset("utf8", $link);
    

    Take care: it’s utf8 while officially it’s written UTF-8. That’s something special with the MySQL database, write UTF-8 as utf8 when you set that parameter.

    Do not use:

    mysql_query("SET NAMES 'utf-8'");
    

    because it’s deprecated (not good, see as well the PHP manual and Whether to use “SET NAMES”).

    And if you tell the database client which encoding you expect, you don’t need to encode your own, like this:

    utf8_encode($text);
    

    Remove that stuff, you don’t need it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL database that has a few very simple tables. I would
I have a MySql database with three tables I need to combine in a
I have a MySQL database with multiple tables, each of which have the same
I have a MySQL database with 60 tables. Most of the tables have primary
I have a mysql database which has grown to over 200 tables in it.
I have a MySQL database with a few (five to be precise) huge tables.
I have a MySQL database set-up in a hierarchy style. There are 4 tables
I have created a MySQL database using MySQL Workbench. It has about 20 tables.
In a MySQL database I have two tables linked in a join. One table
I have two tables in a MySql database: COUNTRY --------------- id, country_name and CITY

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.