ravisiyer / verysimplegita

[Reg. app: https://gita-rsi.vercel.app/ ] Very simple but functional, Bhagavad Gita Next.js web app with minimal code and coding complexity
https://verysimplegita.vercel.app
MIT License
0 stars 0 forks source link

some sort of rendering issue - maybe related to unicode or other special characters #1

Open hn-88 opened 3 months ago

hn-88 commented 3 months ago

Example - ear? skin? eyes? tongue and nose - in https://verysimplegita.vercel.app/verse/376

You could check what sort of characters the original data has, and perhaps do urlencode or something similar to fix.

ravisiyer commented 3 months ago

Thanks hn-88 for your message. The problem is with the original data itself especially with Swami Sivananda commentaries. If you use this query, " { allGitaLanguages { nodes { language } } allGitaVerses(condition: {chapterNumber: 10, verseNumber: 4}) { nodes { gitaCommentariesByVerseId(condition: {authorId: 16}) { nodes { description authorName authorId } } } } } " (copy-paste without double quotes) in https://gql.bhagavadgita.io/graphiql (in middle-top pane just below elephant icon followed by 'PostGraphiQL', copy-pasting over whatever is shown earlier in the pane) which is the GraphQL explorer for the data source, you can see that the result has the ? character issue.

I had noted the problem earlier but as the group behind the frontend app and this GraphQL data source had not responded to my messages about some issues I had with their front end app, I did not message them about this problem. Now that your raising it has resulted in this exchange which documents the issue, I think I will send them a message with this exchange as the reference. Let us see whether they respond .... Continuing in another comment ...

ravisiyer commented 3 months ago

The group's front-end next.js app has the same issue: https://bhagavadgita.io/chapter/10/verse/4 But IIT Kanpur's Gita Supersite which seems to be the original source of this data, does not have this issue (instead of those ?s, we have commas) - https://www.gitasupersite.iitk.ac.in/srimad?language=dv&field_chapter_value=10&field_nsutra_value=4&ecsiva=1&etsiva=1

I had searched for this data being available directly on IIT Kanpur's Gita Supersite or some other IITK site but could not find any links to such IITK sites. My guess is that IITK is not directly sharing this data publicly. Don't know how the above mentioned group got access to the data and were able to put it up as a public data source.

Thanks again for raising the issue and your interest in this.

ravisiyer commented 3 months ago

Added this issue as an issue in the data source related github repo: https://github.com/gita/bhagavad-gita-graphql/issues/2

ravisiyer commented 2 months ago

In the regular web UI upgrade of this app: https://gita-rsi.vercel.app/ , GitHub: https://github.com/ravisiyer/gita , I have put in a temporary fix (hack) for this problem. In the Verse page which is the only page which shows commentaries, I am replacing ? character with , character in all commentaries data retrieved from the data source. The disadvantage is that even ? characters that should be ? will be changed to , characters. But such cases may be very few.

In this Very Simple App, I want to keep the coding complexity low and so have not implemented the above temporary fix.