+ 6

Html file does not showing hindi fonts

When I create a text file ending with .html in both laptop and android phone it does showing the hindi fonts when I run it on a browser. But showing perfectly the English fonts.

29th Dec 2020, 4:49 AM
Jitender Kumar
Jitender Kumar - avatar
36 ответов
30th Dec 2020, 4:55 AM
Jitender Kumar
Jitender Kumar - avatar
+ 6
Jitender Kumar your code seems to working fine in Hindi. https://code.sololearn.com/WL7XysGJV4uB/?ref=app Please share a sample of the code in which you are facing problem.
29th Dec 2020, 5:07 AM
Art1mis
+ 6
Jitender Kumar the sample code you have shared is working fine in every single browser available at my end. Tested on: 1. HTML Viewer 2. Firefox 3. Google Chrome 4. Samsung Internet browser. Hindi text is getting rendered. Screenshot: https://pasteboard.co/JH7Mg9x.png Try importing Hindi fonts like the below example and see if works or not https://code.sololearn.com/WgVDnYcdXm59/?ref=app
29th Dec 2020, 6:21 AM
Art1mis
+ 3
Try to specify the 'lang' attribute in <html> tag, maybe it helps. <html lang="hi">
29th Dec 2020, 5:05 AM
Ipang
+ 3
Seems to be working fine. Here is the screenshot: https://pasteboard.co/JH7qYPL.png Jitender Kumar Try to add this line in head tag and see if it works or not. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hindi is working for me without meta tag
29th Dec 2020, 5:16 AM
Art1mis
+ 3
Jitender Kumar Ensure to save the text file in UTF-8 encoding, maybe it's encoding problem. I saved the code above in my Android phone and it works just fine. Tested in built-in browser and Chrome.
29th Dec 2020, 5:20 AM
Ipang
+ 3
Martin Taylor your code is working fine in my device. Jitender Kumar is your problem solved?
29th Dec 2020, 1:57 PM
Art1mis
+ 3
Jitender Kumar can you please share the character encoding you are using to save the file and following details related to your os. 1. Device Name 2. Operating System & Version 3. Browser Name & Version [Edit]: A video to replicate the issue can be helpful as well. Martin Taylor is there anything else that could cause this problem.
29th Dec 2020, 2:17 PM
Art1mis
+ 3
Jitender Kumar please answer each of the above question. It might help in narrowing down the possible causes of the problem. Hindi fonts from which file or website are getting rendered?
29th Dec 2020, 3:01 PM
Art1mis
+ 2
Jitender Kumar 1. Did this problem persist in any other browser like Microsoft Edge or Firefox? 2. Did hindi fonts from the below mentioned code are getting rendered or not? https://code.sololearn.com/WgVDnYcdXm59/?ref=app [Edit] 3. Is this website opening correctly in hindi? https://m.jagran.com/
29th Dec 2020, 2:40 PM
Art1mis
+ 2
You should use top version of google chrome if it not work properly then ask me again until then I will use your project in my pc
29th Dec 2020, 3:11 PM
Amrit Singh
Amrit Singh - avatar
+ 2
Amrit Singh please don't post spam and follow the community guidelines Kindly use code tab if you want to showcase your code publicly.
29th Dec 2020, 3:37 PM
Art1mis
+ 1
It works fine in solo learn please make new file in your pc or android and copy this.
29th Dec 2020, 5:09 AM
Jitender Kumar
Jitender Kumar - avatar
+ 1
It does not works Ipang
29th Dec 2020, 5:09 AM
Jitender Kumar
Jitender Kumar - avatar
+ 1
Jitender Kumar can you share link to the html file or source code.
29th Dec 2020, 5:41 AM
Art1mis
+ 1
Thanks for the in-depth knowledge Martin Taylor. However, saving file in UTF-8 encoding is already suggested by Ipang
29th Dec 2020, 7:31 AM
Art1mis
29th Dec 2020, 3:34 PM
Amrit Singh
Amrit Singh - avatar
+ 1
Martin Taylor i m creating on my both devices using notepad++ Solo learn shows correctly Your code is working well
29th Dec 2020, 3:36 PM
Jitender Kumar
Jitender Kumar - avatar
+ 1
Jitender Kumar Please create a new file in Notepad++ and then take a screenshot of the "Save File" dialog just before you click the "Save" button. And share the capture link here. I just want to see the Notepad++ "Save File" dialog. So please, don't capture the entire screen.
30th Dec 2020, 5:49 AM
Ipang
+ 1
Hi
30th Dec 2020, 2:12 PM
Ijharul Islam
Ijharul Islam - avatar