NATION

PASSWORD

visual bug when previewing "æ"

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Haganham
Ambassador
 
Posts: 1722
Founded: Aug 17, 2021
Psychotic Dictatorship

visual bug when previewing "æ"

Postby Haganham » Fri Nov 25, 2022 9:57 am

Previewing this https://www.nationstates.net/page=dispatch/id=1801077
in an rmb post causes a bug where "æ" displays as "æ"
Remember kids, if it doesn't have private property rights, competitive markets and voluntary exchange then it's just sparkling feudalism.
TITO Tactial Officer
Assistant WA secretary: 10000 Islands, TEP
Praefectus Praetorio, Caesar: Oatland
Cartographer: Forest

User avatar
Barbaria
Spokesperson
 
Posts: 156
Founded: Nov 22, 2022
Moralistic Democracy

Postby Barbaria » Fri Nov 25, 2022 10:04 am

/notamod I've tested this and can confirm this happens.
Federal Republic of Barbaria
A modern tech nation with few post-modern elements. Mostly conservative and "good for some, bad for others".
Depression/Suicide Help Resources | Frequently Asked Questions | One Stop Rules Shop

User avatar
Wormfodder Delivery
Diplomat
 
Posts: 552
Founded: Feb 14, 2021
Compulsory Consumerist State

Postby Wormfodder Delivery » Fri Nov 25, 2022 2:23 pm

Seems to be browser based, as I just checked the RMB post and it displayed normally there, use Opera currently.
Edit: Nevermind, it also is that way on Opera when previewed.
Last edited by Wormfodder Delivery on Sat Nov 26, 2022 4:34 am, edited 1 time in total.
NS Stats do not count, unless it is funny.
The Transcripts canonically do not exist and merely serve to make the garbled Wormsspeak readable.
Canon Policies.
Open to RP, send me Telegrams, Pretty much compatible with everything.
Powerlevel of 4,5 according to this classification
Industrial Age Schizotech and Proud
Zero tolerance for godmodders and no effortposters are nearing that too.
The Wormfodder Delivery Service, bringing Wormfodder to you, whereever you are.
I also am currently making a pocket guide on how to have a good time on F7, as well one on (ノ ゜Д゜)ノ ︵ ┻━┻.
Ask the many questions us here, though answers aren't guaranteed~
Get the latest, hottest news at WDSNN, the best News source of the next dimension!
It is now safe to keep playing.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10110
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Fri Nov 25, 2022 3:34 pm

EDIT: I completely missed the point, and so everything in this post is irrelevant. Ignore me.

I assume you're refering to this post?

So while poking around, I noticed something interesting. The Antiquity theme includes this line in the header:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
This is, according to the HTML 4 standard, the correct way to indicate character encoding. Meanwhile, the Century and Rift themes include this line instead:
<meta charset="iso-8859-1">
This is a new notation defined in the HTML 5 standard that was not present in HTML 4, but most browsers should support HTML 5 nowadays. However, the HTML 5 standard also specifies:
The charset attribute specifies the character encoding used by the document. This is a character encoding declaration. If the attribute is present, its value must be an ASCII case-insensitive match for the string "utf-8".
The Encoding standard requires use of the UTF-8 character encoding and requires use of the "utf-8" encoding label to identify it. Those requirements necessitate that the document's character encoding declaration, if it exists, specifies an encoding label using an ASCII case-insensitive match for "utf-8". Regardless of whether a character encoding declaration is present or not, the actual character encoding used to encode the document must be UTF-8.
Which just leaves me wondering what the heck? Why bothering adding a new way of specifying the character encoding that allows only one possible value? Was there some intermediate form of the standard in which other encodings were permitted? Regardless, websites which use non-UTF-8 character encodings remain common on the internet, so practical browsers (including mine - the post displays correctly for me) will make some effort to implement them regardless of what the HTML standard says.

In any case, examination of the page in a hex editor shows that the "æ" is, in fact, encoded in its ISO-8859-1 representation. This makes it even weirder that it displays as "æ" for you, since that is what it would display if a UTF-8-encoded character in the page were misinterpreted by your browser as ISO-8859-1, which clearly cannot be the case (I checked the page, and nowhere in it does the UTF-8 encoding of "æ" appear).

My best guess, in light of this evidence, is that you have some sort of browser script that reads the page, modifies it, and inserts the modified text back into the page, but mangles the character encoding during the "insert the modified text back into the page" stage. Are you using any NationStates browser plugins? If so, try turning them off and seeing which one causes the problem.

Or did I get the wrong link? If so, please link to the actual page that has the problem.
Last edited by Trotterdam on Sat Nov 26, 2022 3:27 am, edited 1 time in total.

User avatar
Racoda
Forum Moderator
 
Posts: 407
Founded: Aug 12, 2014
Democratic Socialists

Postby Racoda » Fri Nov 25, 2022 5:32 pm

Trotterdam wrote:I assume you're refering to this post?

[...]

Or did I get the wrong link? If so, please link to the actual page that has the problem.

Haganham wrote:Previewing this https://www.nationstates.net/page=dispatch/id=1801077
in an rmb post causes a bug where "æ" displays as "æ"

I think the previewing part is relevant here. Indeed, the post itself looks fine, but when writing an RMB post with a link to the dispatch and clicking on preview, it bugs out.

Acting as a player unless accompagnied by mod action or reddish text
Any pronouns

User avatar
Phydios
Minister
 
Posts: 2482
Founded: Dec 06, 2014
Liberal Democratic Socialists

Postby Phydios » Fri Nov 25, 2022 8:12 pm

Trotterdam wrote:My best guess, in light of this evidence, is that you have some sort of browser script that reads the page, modifies it, and inserts the modified text back into the page, but mangles the character encoding during the "insert the modified text back into the page" stage. Are you using any NationStates browser plugins? If so, try turning them off and seeing which one causes the problem.

I doubt this is a browser issue. I replicated it (as described by Racoda) on iPhone Safari just fine, and I certainly don't have any scripts or plugins running.
Last edited by Phydios on Fri Nov 25, 2022 8:12 pm, edited 1 time in total.
James 1:26-27, Matthew 7:21-23
If you claim to be religious but don’t control your tongue, you are fooling yourself, and your religion is worthless. Pure and genuine religion in the sight of God the Father means caring for orphans and widows in their distress and refusing to let the world corrupt you. | Not everyone who calls out to me, ‘Lord! Lord!’ will enter the Kingdom of Heaven. Only those who actually do the will of my Father in heaven will enter. On judgment day many will say to me, ‘Lord! Lord! We prophesied in your name and cast out demons in your name and performed many miracles in your name.’ But I will reply, ‘I never knew you. Get away from me, you who break God’s laws.’

User avatar
Trotterdam
Postmaster-General
 
Posts: 10110
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sat Nov 26, 2022 1:32 am

Racoda wrote:I think the previewing part is relevant here. Indeed, the post itself looks fine, but when writing an RMB post with a link to the dispatch and clicking on preview, it bugs out.
Oh, right. Missed that part. Ignore me, then.

In that case, it's probably an issue with JavaScript/AJAX using a different encoding than the main site. But using JavaScript for such a thing is poor design anyway.

EDIT: Wait, does it happen only in the factbook preview, and not when previewing a post which has "æ" typed in it normally? In that case, it must be something serverside with the factbook code and RMB code not communicating properly.
Last edited by Trotterdam on Sat Nov 26, 2022 6:12 am, edited 1 time in total.

User avatar
Roavin
Forum Moderator
 
Posts: 1403
Founded: Apr 07, 2016
Scandinavian Liberal Paradise

Postby Roavin » Sat Nov 26, 2022 5:24 am

Bug has been entered into our backlog; thanks for the report!
Helpful Resources: One Stop Rules Shop | API documentation | NS Coders Discord
About me: Longest serving Prime Minister in TSP | Former First Warden of TGW | aka Curious Observations

Feel free to TG me, but not about moderation matters.


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Northern karm

Advertisement

Remove ads