Translation files for Turkish language not encoded correctly - utf-8

I am using translation files for translating my xpages application to turkish language.
I have set the application encoding to UTF-8 (xsp.html.page.encoding=utf-8)
Most of my languages is working fine but there is problem with Turkish and Polish
The problem I have is that the labels from the translation file do not display the correct encoding even though I have it set up correctly.
All content that is created on my site display correctly in turkish but not the labels from the translation files.
I have tried setting lang=tr, lang=tr-TR, added UTF-8 meta tags, and changed the property file encoding to UTF-8 but still it is not working,
Here is an example
This is Correct turkish entered into the translation file
FACEBOOK KİŞİLİĞİNİZ İLE GİRİŞ YAPIN
This is a sample what the browser outputs
FACEBOOK KÝÞÝLÝÐÝNÝZ ÝLE GÝRÝÞ YAPIN
This is my header settings
<html lang="tr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
You can also see a live example of this problem at http://www.intrapages.com
at the bottom of the login screen there is change language link, set it to turkish

This is a unicode issue. Designer does not convert those characters to unicode.
You can export '.properties' file, use native2ascii command line utility to convert it to unicode values (\uXXXX format).
Another easy option is using an online native2ascii converter. There are a couple of those I know (e.g. this and this)

Related

ADA Compliance Language Missing or Invalid for video transcription txt files

Reaching out to see if any ADA compliance experts might know how I might resolve an ADA compliance issue pertaining to our video transactions. We essentially provide links to .txt files for all of our videos which contain the video transcription. But when running an ADA scan we receive 2 errors pertaining to our transcriptions.
"Language missing or invalid "
"Missing or uninformative page title"
I'm not sure how I would tell a screen reader or ADA scanner the language or a page title given that these are just plain txt files. Any assistance would be greatly appreciated. Thanks.
This might be more about how your browser is set up to handle .txt files. Is your default action to download the file or to view it in the browser?
If the file is downloaded, then it's up to the end user to display the .txt file in whatever program they have set up to view them.
If you're letting the browser display the page, then that page is generated by the browser and I'm not sure if you can customize the page that's generated. I tried Firefox, Chrome, and Edge and they all generated a similar template to view a text file. (Edge uses the chromium engine so it's not surprising that Edge and Chrome have the same template). There's just a minor difference in the <head> between Firefox and Chrome.
This is essentially what's generated:
<html>
<head>
<!-- if using firefox -->
<link rel="stylesheet" href="resource://content-accessible/plaintext.css">
<!-- if using chrome/edge -->
<meta name="color-scheme" content="light dark">
</head>
<body>
<pre>
(contents of text file)
</pre>
</body>
</html>
If you run an accessibility scanner on this generated page, you will indeed get the two errors you mentioned.
3.1.1 Language of Page
2.4.2 Page Titled
For the language, that's specified on the <html> element with the lang attribute. If you bring up the code inspector on this stackoverflow page, you'll see lang="en":
<html class="html__responsive " lang="en">
For the page title, that's specified in the <head> with a child element of <title>. You can also see that in the stackoverflow page:
<head>
<title>wcag - ADA Compliance Language Missing or Invalid for video transcription txt files - Stack Overflow</title>
...
</head>
If no page title is specified, the browser usually shows the URL or just the filename as the title.
So, can you do anything about the template? I'm not sure. That would be an interesting project.
An alternative is to have your own webpage display the text file, which you would obviously have complete control over and could specify the language and the page title. But I would make this a lower priority issue over other accessibility issues that your website might have.

Special characters in UTF-8 using RenderBody()

I'm developing site in ASP.NET MVC6 with Polish letters. They work just fine when I write them in _Layout.cshtml, but I'm also using RenderBody() for rendering views.
Using Html.DisplayFor(modelItem => item.ID) inside view, displays Polish characters properly, but when I use plain html and write something, all I see on the website is "?" in place of every used Polish letter.
In _layout.cshtml I have a declaration:
<meta charset="utf-8" />
And in web.config I have:
<?xml version="1.0" encoding="utf-8"?>
I have the same problem with asp.net core aka MVC6, visual studio 2017. Especial characters like â appear � and client side validation like ViewBag.Equals("â") is not working properly.
So I change the view files (.cshtml ) codification with notepad++ from ANSI to UTF-8.
I checked my global solution settings for UTF-8, but I didn't checked single file encoding setting, so in solution explorer you have to click your .cshtml file, then:
file->advanced safe options->Unicode(UTF-8 with signature)-Codepage 65001
Now it works.

Indian and Arabic Language support for Boilerplate

I'm using HTML5 Boilerplate template for creating a basic template for a CMS. How can I make sure, this template can display Arabic language or any Indian language? I noticed there is in header. But when I typed in Indian language it's not showing up, instead showing ???? marks. Do I have to change the font-family from default Sans-Serif? Thanks in advance.
The problem was with the encoding of my html file. I'm using Notepad++ and it's encoding was 'Encode in UTF-8 without BOM'. I changed that to 'Encode in UTF-8'. Now it's fine.

Classic ASP enconding with VS 2012/2013 preview

We're working with a Classic ASP project in VS 2012. We imported the files from an old repository to a new project.
The issue is that we need to save the file as UTF-8. Some of them already are encoded in UTF-8, but others are encoded in Windows-1252. So googling a bit, we found out about the "Advanced Save Options" menu. We can change the file to UTF-8, but when we make changes to the file and save it (deleting one char, for example), VS then switches automatically to the previous enconding (Windows-1252, or ISO-8859-1, codepage 28591).
Is there a way to make VS to always save the files in UTF-8? Or are we mistaken from the beginning and should take another approach?
PS: We have already set the option "Save as Unicode when data cannot be saved as codepage"
PS2: This happens too in VS 2013 preview
Many thanks in advance
Ok, I found the solution:
I started to paste code from an old file in UTF-8 to an empty one, which was in Windows-1252 and then I changed to UTF-8.
When I pasted the part of the head, there was a
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
and VS then switched to ISO-8859-1, codepage 28591. It seems that VS 2012 / 2013 recognizes the meta tag and what charset you have chosen, and changes the file's encoding, which I find to be logical, but it could be useful to tell the user why you're switching encodings :)

Unable to view all hindi sites on MAC 10.5.5

I have created a sample Indian site and tried in Safari on MAC 10.5.5, I am unable to view, Browser shows Boxes instead of valid text.
I tried the same on latest firefox browser but same issue. I have changed the encoding to UTF-8 in browser preferences but it not help.
Please let me know how to resolve this.
Thanks in advance,
Laxmilal Menara
How's encoded your file ? What charset do you provide in your metas ?
A good method should be to encode all your files in UTF-8, and to provide a nice meta as
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
try to encode your font with unicode standards

Resources