Open Marvinjee opened 1 year ago
Do you have the URL of a feed where that’s not true?
Chinese and Japanese both use Kanji (Japanese way to say 'Chinese character') in their writing system. But some of the same Kanji characters are having different ways to be written in the two writing system.
Like in Chinese. 天, meaning sky, have the upper line shorter than the lower line.(https://baike.baidu.com/item/天/34055)
In Japanese, 天,also meaning sky, have the upper line longger than the lower line. (https://www.google.com/url?sa=i&url=https%3A%2F%2Fkanji.jitenon.jp%2Fkanji%2F061.html&psig=AOvVaw0HbyTVTNG3OHOkoQ7R7tl1&ust=1669272099885000&source=images&cd=vfe&ved=0CBAQjRxqFwoTCMCSsqbZw_sCFQAAAAAdAAAAABAE)
But in the Unicode, 天 as A CJK(Chinese,Japanese,Koeran) character, is set as u5929. So if your system is set as Chinese-Simplified or Chinese-Traditional, u5929 will render in the Chinese way. If your system is set as Japanese, u5929 will render in the Japanese way. Same to a lot of CJK unicode character.
Back to the rss feed. If my system is set to Chinese, all of the CJK character, in default will be render in the Chinese way. No matter what languages the feed is in. So if i am reading a Japanese aritical, The characters will look very weird.
To slove this is very easy. Let feed in Chinese to render in Chinese way and Japanese feed to render in Japanese way. Here is where font kick in. If i can set a specific feed to a specific theme, i can set which font i want my feed to be showed in. So if the feed is in Chinese, i can just set a Chinese-font to the feed. If it's in Japanese, i can set a Japanese-font to the feed.
I hope my awful English can delivere the meaning that i want to say. Thank you for your time.
I understand. Good lesson! I didn’t know about this issue.
Would you reply with the URL of a Chinese feed and of a Japanese feed that you read? I’d like to be able to see if it’s possible to detect the language.
Chinese feed: https://www.ifanr.com/feed Japanese feed: https://www.nhk.or.jp/rss/news/cat6.xml
It looks like RSParser is already handling the language element in various formats. It just looks like we overlooked persisting and using it in the ArticlesDatabase. We need to add it there and to the Article
type. We can then substitute it into page.html
as below which will correct the issue.
<html dir="auto" lang="ja-jp">
@Marvinjee The NHK link you provided doesn't supply the necessary language
RSS element, so even after we fix this, that particular feed won't work any different for you.
Understand. Thank you very much.
From: Maurice Parker @.> Date: Tuesday, November 29, 2022 at 10:53 AM To: Ranchero-Software/NetNewsWire @.> Cc: Marvinjee @.>, Mention @.> Subject: Re: [Ranchero-Software/NetNewsWire] Is there anyway to sign different theme to different rss sources (Issue #3757)
It looks like RSParser is already handling the language element in various formats. It just looks like we overlooked persisting and using it in the ArticlesDatabase. We need to add it there and to the Article type. We can then substitute it into page.html as below which will correct the issue.
@Marvinjee
Like if I am reading Japanese articles, I want my page to render in Japanese font. When I am reading Chinese articles, I want my page to render in Chinese font. Is that possible?