angular app encoding German character as gibberish - html

I have created an Angular 5 application which have German characters. I am working on IntelliJ IDE and have problem in using german characters in html. As per the information already given in these tickets How can I properly display German characters in HTML?
and How can I use special characters in angular directives attributes?, I have added the following lines in my html file:
<html xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" charset="utf-8" />
</head>
...
Also, I have set the file encoding type to UTF-8 in the IDE.
When I compile the code, I can see that they are correctly encoded in the webpack files but when I deploy (openshift deployment), I get gibberish in place of German umlauts: Image with incorrect Encoding
Though when I refresh the page once, it gets corrected: Image with correct Enoding
Can anybody please assist with this issue?

Related

Arabic text displays as question marks - firebase hosting

I'm setting up a page for terms with firebase hosting. I deployed the page but my text in page shows as question marks. my text is in Arabic language.
I tried many answers, but none of them work.
maybe the problem in firebase hosting?
I tried:
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1256">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-6">
My Code:
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<body>
<h1 dir='rtl' lang='ar' >الشروط</h1>
<p dir="rtl" lang="ar">الشروط</p>
Code looks OK - just make sure your editor save it in UTF-8,
To verify this - download the file from the server as "yourfilename.html" and open it locally in your browser - see if you see it in Arabic.
If you don't, open it in notepad - you will probably see question marks which means you didn't save the file in UTF-8 format - you probably saved it as ASCII.
If on the other hand you will see it in Arabic - seek in the response structure you receive maybe something there is not right.

HTML - charset windows 1255 works but utf-8

I wrote html page that displays mixed hebrew/english content.It works fine with charset "windows - 1255"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html dir="rtl" lang="he">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
,But I figured that people will have trouble if their machines doesn't support hebrew. I changed the charset to utf-8 and got
HTML:
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
View:
"��� ��� ������, ��� ����� �����, �� ������ ���� ��� ���� �� ������"
Read zohar ��� ����
....
Isn't utf-8 suppose to support more chars then windows 1255?
I guess when you changed the tag, you didn't tell your editor to convert the file to UTF-8. So, the file is still in Windows-1255 format, but the browser tries to read it as if it was UTF-8, so you get bad/unreadable characters.
I have no idea which editor you're using, so i can't tell you how to put it in UTF-8 mode. Try to find a setting in your options regarding the character set to use. Or, open the file in Windows notepad, and when saving it, make sure you select "Codepage: UTF-8" from the drop down box next to the save button.
Relation to Unicode
The Unicode Hebrew block (U+0590–U+05FF) follows Windows-1255 by encoding both letters and vowel-points in the same relative positions as Windows-1255. Unicode goes further in encoding cantillation marks in lower positions. Unicode Hebrew is always in logical order.
For modern applications UTF-8 or UTF-16 is a preferred encoding.
Source: http://en.wikipedia.org/wiki/Windows_1255
It seems to me that your encoding should still work if your characters are within the Unicode Hebrew block.

meta char set UTF 8 encoding error

I have used the following code in my head tag.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Panel</title>
</head>
I have characters of other language which is supported by UTF-8 encoding in my web page. But when i save my html file it showed me error The document's current encoding can not correctly save all of the characters within the document. You may want to change to UTF-8 or an encoding that supports the special characters in this document.
I have already using UTF-8. How to fix this?
You are not using UTF-8. You have just included some markup which tells the browser you are using UTF-8.
That error message sounds like it is coming from your editor. You need to configure your editor to save in UTF-8.

UTF-8 unreadable in phonegap android

I'm working on my first phonegap application, an android based simple form app.
My problem is that all my non-latin characters appear unreadable.
I added the content meta tag with utf-8, made sure I saved the file as utf-8, made sure to use font with the needed letters and also added xml:lang to the decleration.
Couldn't find any other idea, because i'm a web dev and this usually solves these issues...
Maybe someone has any idea?
feels like my questions back when I just started web development :)
Thanks!
Just add meta:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
If you are using Eclipse, which is default for the PhoneGap Android, make sure you applied the utf-8 text file encoding. (Project - Properties - Resource: Text File Encoding - Other [UTF-8]).
The meta tag should also be in your index.html
<head>
<meta charset=utf-8>
...
</head>
sometime it happens from visual studio page Unicode setting: for this go to file > advance save options > select Unicode utf 8 with signature and then click ok.

Charset UTF-8 doesn't work (stuck with these ?-marks)

I have a Unicode problem... I´ve done this before but for now, I cannot understand
why the Icelandic letters don´t show up - I have those question marks again
Here is the url (very plain and short html5)
http://nicejob.is/new/
Everything I Google says: use the <meta charset="utf-8"> as I do.
Any suggestions?
Your page is already viewed as UTF-8. But your source code is not saved as UTF-8.
Please change the encoding of your source code file to UTF-8.
Not all browsers support HTML5-way tags yet
here you can see table of compability
Try this instead:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
I can see a couple of issues.
The META should look like this:
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
The <html> specified lang="en" which might be prone to confusing some browsers.
When I view the HTML from the browser, the question marks are encoded as 0xEF 0xBF 0xBD, which is the UTF-8 encoding for the byte order mark or BOM, aka U+FEFF. So, for whatever reason, the HTML is not transmitted as sensible UTF-8 (though it does seem to be valid UTF-8).
Probably you are using some text editor like notepad++,
and you didn't set up encoding to UTF-8 in that text editor.
What you have to do is to save the file with utf-8 encoding by using Notepad (the attached one with Windows).
Steps:
Save as ..
In the below options ... you will find encoding option choose UTF-8 ...
And save the file ...
Then add the line <meta charset="UTF-8" /> inside your file ...
And it will work.