Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Unicode conversions[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, Mar 31, 2016 10:14 PM UTC:

I made some conversions to UTF-8 today.

I converted the Chinese page for Chess by viewing the source code in the correct encoding, then copying that into a UTF-8 document.

For the rest, I did conversions with a script. If a string was detected to be either ASCII or UTF-8, I left it alone. If a string that was neither ASCII nor UTF-8 was detected to be Windows-1252, I converted it from Windows-1252 to UTF-8. If it wasn't detected to be any of these, I detected its encoding and converted it from that to UTF-8.

I converted the first and last names in the Person table to UTF-8.

I converted the following items from MemberSubmissions to UTF-8. I checked the first one before doing the rest, and I checked a few random ones after running the conversion, each one checking out fine.

MSbermuda-chess-angle
MSstep-and-circle-trigchess
MSlancelot
MSqueens-or-castles
MSshatranj-of-troy
MStransmitter-chess
MSshatranj-darwinian
MSregenbogen
MSmir-chess
MSmedusa-shogi
MStravelers
MSmockery-chess
MShaunted-chess
MSbughouse-spartan-chess
MSantarctic-chess-or-predators-and-penguins
MSbordahbee-a-two-board-game-two-8x8-boards
MScannons-of-chesstonia
MPgo
MSdiagonal-3d-chess
MSthree-elephant-chess
MSjetan-jeddara
MSdimension-x
MPgiant-chess
MSfour-handed-elephant-chess
MSremote-sensing-with-on-off-board-detection
MSludus-magus
MSroswell-chess
MSsplit-phase-tri-plane
MSsix-fortresses
MLconstable-chess
MStrimac-hexchess
MPsmaller-alice-chess
MPracing-kings
MPhex-dabbaba-qi
MSsix-fortresses-short-range-shoranji
MSjedi-chess
MSskandaran-chess
MPphilosophers-chess
MSfools-hexagonal-chess
MPwalkers-and-jumpers
MSsunflower-hexchess
MPmini-hexchess
MSanti-check-chess
MSshogi-of-chesstonia
MPamoeba
MStrimac-3-friends
MSsuper-splicers
MSshort-splicers
MPbuilding-chess
MSinsane-ninja-chess
MSchess-on-a-mass-transit-system
MSspartan-chess-28
MPcgnp-chess
MSstallmate-chess
MSchess-with-wizards
MLpaulovitss-game
MSdesert-pub-chess
MSdesert-oasis-chess
MSchesimal-fusion-i
MSblunderbuss-chess
MSdelta88-chess
MPgiant-chess-2
MScapture-the-scepter
MSflying-bombers-grand-chess
MSclaustrophobia
MSflying-bombers-with-hangars
MPflying-bombers-grand-chess
MZoctopus-chess
MSpalace-ninja-guards
MSninjutsu-claustrophobia-2
MSbirds-and-ninjas
MPpalace-ninja-guards
MSpenturanga
MSlongshanks-chess
MSraptor-chess
MSideal-chess
MSsorcerer-chess
MZinsane-ninja-chess
MSholy-grail
MSstealth-ninja-chess
MSthree-quarter-board
MPomega-transplant
MSalapo-8x8
MSmodern-random-chess-64
MSajedrez-aleatorio-moderno-spanish
MSpro-chess
MScontemporary-random-chess
MSreverse-symmetry
MSthe-four-modern-chess-principles
MPmodern-capablanca-random-chess
MSsingle-combat-chess
MPprime-ministers-random-chess
MSprime-ministers-random-chess
MSkings-guard-chess
MSajedrez-aleatorio-del-primer-ministro-spanish
MSmodern-prime-ministers-random-chess
MSmodern-prime-ministers-chess
MPprime-ministers-chess
MSherculean-chess
MSprime-ministers-chess
MSprime-minister
MSprime-ministers-contemporary-random-chess
MSeurasia-chess-chessmen-set-for-chess-xiangqi-shogi-variants
MZherculean-chess
MShadean-chess
MZomega-transplant
MZhadean-chess
MZraptor-chess
MSdisplacement-chess-2
MSinternational-contemporary-random-chess
MSinternational-fischer-random-chess
MPpseudo-modern-random-chess
MSmodern-english-random-chess
MZwreckage
MZpick-the-piece-big-chess
MSatlantean-coffee-house-shatranj
MZzigzag-madness
MSscirocco
MScoprime-shogi
MStyphoon-revised
MZtyphoon-revised
MShow-to-generate-otb-random-positions
MSgrand-ducal-chess
MZchinese-international-chess
MZasylum-redux
MScentral-rotational-chess
MSmodern-ministers-courier-chess
MSchess-with-different-periods
MZchess-with-different-periods
MSajax-capablanca-chess
MZvenomous
MSchameleon-chess-redux
MScarnage
MSajax-random-chess
MShex-dragonal-chess
MStiger-lily-chess
MSajax-modern-random-chess
MSchafl
MStrampoline-chess
MZ10-directionai-chess
MSwing-with-riverqi
MSzabel-schach
MScitadel-8-rank-9-rank
MS3d-great-shatranj
MSbizarro-chess
MSshogchess
MSoskars-3dchess-version-2
MShar-meggido-chess
MSchess-variant-making-off
MStale-for-a-chess-variant
MSquantimex
MSmega-doom-chess-project
MZpierre-menards-chess-variant
MSdiagonal-oblong-chess
MZdiagonal-oblong-chess
MSbattle-of-the-six-armies

🕸Fergus Duniho wrote on Thu, Jun 14, 2018 08:50 PM UTC:

One problem with my old unicode conversions is that to get the text to appear as unicode on the page, it had to look like gobbeldygook in the database. By setting the charset to utf8mb4 when opening a PDO connection, I am able to have text appear as unicode on the page while also appearing as unicode in the database. This is a good thing, but it also means that I have to do the unicode conversions over. I just did names of inventors. But to do this, I had to temporarily delete "charset=utf8mb4" from connect_to_database(), so that the text would appear correctly on the page so that I could copy and paste it to the database. When I'm not doing more conversions, I'll set it back to utf8mb4. Until the conversions are done, I'll be alternating between making the charset utf8mb4 and not making it that, and some non-ASCII strings will look weird. When it's all done, I'll set the charset to utf8mb4 for good, and all non-ASCII text should look correct.


🕸Fergus Duniho wrote on Thu, Jun 14, 2018 10:29 PM UTC:

So far, I have fixed the names of inventors and authors, and I have started on other names. But I stayed on the computer so long that artifacts have started floating in front of my eyes. So I'll have to get back to this later.


🕸Fergus Duniho wrote on Fri, Jun 15, 2018 12:24 AM UTC:

I now have a plan for automating the rest of the conversions. In a test, I opened two PDO connections, one with charset set to utf8mb4 and one with it not. I read a column with it not set, and I updated the same column with it set. Doing this corrected it just as if I had cut and pasted the correct version. I don't want to stay on the computer much longer tonight, but I can write a script tomorrow that uses two different PDO connections to automatically convert the database strings to proper Unicode.


4 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.