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 8188477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:55:36+00:00 2026-06-07T02:55:36+00:00

I’m having issues with turkish characters as I mentioned in title. I created a

  • 0

I’m having issues with turkish characters as I mentioned in title. I created a function on MySQL:

DELIMITER $$

CREATE DEFINER=`root`@`localhost` FUNCTION `ilgiAlaniFunc`(
            idKullanici INT, 
            ilgi_alani_ismi varchar(255) CHARSET utf8 COLLATE utf8_turkish_ci
        ) RETURNS varchar(255) CHARSET utf8 COLLATE utf8_turkish_ci
    READS SQL DATA
    DETERMINISTIC
BEGIN
    -- Function logic here
    DECLARE ret int DEFAULT -1;
    select id Into ret from ilgi_alanlari
        where ilgi_alani_adi=ilgi_alani_ismi  limit 1;
    IF(ret = -1) then
        INSERT INTO ilgi_alanlari(ilgi_alani_adi) values (ilgi_alani_ismi);
        SELECT last_insert_id() into ret;
    END IF;
    insert into kullanici_ilgi_alani(kullanici_id, ilgi_alani_id)
        values (idKullanici, ret);
    RETURN ret;
END

This is the dump of queries I run:

111 Connect root@localhost on anketsis_main
111 Query   select ilgiAlaniFunc(43,'kıvılcım')
111 Query   select id Into ret from ilgi_alanlari where ilgi_alani_adi= NAME_CONST('ilgi_alani_ismi',_utf8'k' COLLATE 'utf8_turkish_ci')  limit 1
111 Query   insert into kullanici_ilgi_alani(kullanici_id, ilgi_alani_id) values ( NAME_CONST('idKullanici',43),  NAME_CONST('ret',54))

Here you can see that ‘kıvılcım’ turns to ‘k’. After the first turkish character MySQL erases all after that.

And here is a correct dump:

120 Query   select ilgiAlaniFunc(44,'Hello')
120 Query   select id Into ret from ilgi_alanlari where ilgi_alani_adi= NAME_CONST('ilgi_alani_ismi',_utf8'Hello' COLLATE 'utf8_turkish_ci')  limit 1
120 Query   INSERT INTO ilgi_alanlari(ilgi_alani_adi) values ( NAME_CONST('ilgi_alani_ismi',_utf8'Hello' COLLATE 'utf8_turkish_ci'))
120 Query   SELECT last_insert_id() into ret
120 Query   insert into kullanici_ilgi_alani(kullanici_id, ilgi_alani_id) values ( NAME_CONST('idKullanici',44),  NAME_CONST('ret',56))

As you can see ‘Hello’ is ‘Hello’ everywhere.

Every collation is utf8_turkish_ci in in my scheme.
Edit: I noticed that my question does not includes a question. So here is it: How can I make MySQL believe that I’m sending strings bigger than it thinks

  • 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-07T02:55:38+00:00Added an answer on June 7, 2026 at 2:55 am

    I assume you’re sending these queries from PHP. I can say that because you are me.

    Apparently ‘utf8_turkish_ci’ collation can decode gibberish utf8 codes but not plain Turkish characters. Changing encodings on php files by header('Content-Type: text/html; charset=utf8'); you can overcome this problem.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I need a function that will clean a strings' special characters. I do NOT
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;

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.