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

  • Home
  • SEARCH
  • 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 4330850
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:01:21+00:00 2026-05-21T10:01:21+00:00

my page has utf-8 meta element added + sql server encoding is also utf.

  • 0

my page has utf-8 meta element added + sql server encoding is also utf. However when I create record and try to issue SELECT statement with condition that contains POLISH characters like ‘ń’ , I see no results. Any ideas what am I missing?

ALSO Sql management studio shows result with POLISH characters , but I don’t trust it…. I guess something is wrong with putting record into database…

Or how can I troubleshoot it?

Thanks,Paweł

  • 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-05-21T10:01:23+00:00Added an answer on May 21, 2026 at 10:01 am

    I had the same issue, and I solved it by prefixing the text in the WHERE clause with “N”.

    For example, I have a table ‘Person’ containing a bit over 21,000 names of people. A person with the last name “Krzemiński” was recently added to the database, and the name appears normal when the row is displayed (i.e., the “ń” character is displayed correctly). However, neither of the following statements returned any records:

    SELECT * FROM Person WHERE FamilyName='Krzemiński
    SELECT * FROM Person WHERE FamilyName LIKE 'Krzemiń%'
    

    …but these statements both returned the correct record:

    SELECT * FROM Person WHERE FamilyName LIKE 'Krzemi%'<br>
    SELECT * FROM Person WHERE FamilyName LIKE 'Krzemi%ski'
    

    When I executed the following statement:

    SELECT * FROM Person WHERE FamilyName LIKE '%ń%'
    

    I get all 8900 records that contain the letter “n” (no diacritic), but I do not get the record that contains the “ń” character. I tried this last query with all of the Polish characters (ąćęłńóśźż), and all of them except “ó” exhibit the same behavior (i.e., return all records with the lower-ASCII equivalent character). Weirdly, “ó” works as it should, returning only those records with an “ó” in the FamilyName field.

    In any case, the solution was to prefix the search criterion with “N”, to explicitly declare it as Unicode.

    Thus, the following statements:

    SELECT * FROM Person WHERE FamilyName LIKE N'%ń%'
    SELECT * FROM Person WHERE FamilyName=N'Krzemiński'
    

    …both return the correct set of records.

    The reason I was confused is that I have MANY records with weird diacritics, and they all return the correct records even without the “N” prefix. So far, the only characters I’ve found that require the explicit “N” prefix are the Polish characters.

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

Sidebar

Related Questions

This Wikipedia page has an extensive list of hashing methods As you can see,
I'm working on a page has an ol with nested p's, div's, and li's.
I want to disable Javascript once a page has already loaded. Why? Because I
Is there any way I can detect when my page has been set as
I have a page that has an iframe From one of the pages within
Given an HTML page that has a complex table-based layout and many tags that
I have small page which has label, DropDownList and a submit button. <div> <asp:label
I have a Page that has a single instance of a UserControl that itself
I have a page which has a rectangular area with text and icons in
I have a login page that has several textboxes on the page, one of

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.