I would like Α
to display as A in the browser, but remain Α
in my source code. My reason is that I would like to store the code in a SQL table as Α
. However, anytime I add the literal Α
and view the source code, I see A. Since this text might be resent back to the database (as input in a form), I lose the Α
version.
I don't seem to have this problem with the
which is the behavior I'm looking for.
Any suggestions?
Α
stays the same when viewing the source code in a separate browser window. I inserted Α
into my own MySQL table called 'test' using the command below, and it remains the same.
INSERT INTO test (column1, column2) VALUES ('Α', ' ');
Perhaps you were using an element inspector to view the source code? That is when Α
will appear as A. This happens to other special character codes such as ©
(©) and ►
(►).
If this is the case, then consider right clicking and selecting View Page Source or similar option instead.
You need to encode and decode your Html while storing to the database. Here is a Few links to help you.
http://www.strictly-software.com/htmlencode
https://msdn.microsoft.com/en-us/library/windows/apps/hh464984.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With