Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 215 forks source link

Profiler: Characters or guild names that are not in English cannot be displayed #313

Closed qyh214 closed 2 years ago

qyh214 commented 2 years ago

Describe the bug and how to reproduce it Profiler: Characters or guild names that are not in English cannot be displayed

no errors in aowow_errors,

and cn server is shown in us(how to fix that?or maybe tc server issue?)

give some links for example:

/?guild=us..killer-durotar QQ截图20211111224338

this is well but if name is Chinese will give error like Screenshots

Screenshots

QQ截图20211111223932

System:

Sarjuuk commented 2 years ago

can you please provide some sample strings for guild and character names.

something to copy/paste, so i can test it locally.

qyh214 commented 2 years ago

you can copy this and modify your database to test it.

In addition: in database(e.g:aowow_profiler) all name are right!

guild name: 为了部落

character name: 为了联盟

qyh214 commented 2 years ago

Further test report: maybe url issue. if you type http://xxxx/?guild=us..%E4%B8%BA%E4%BA%86%E9%83%A8%E8%90%BD (%E4%B8%BA%E4%BA%86%E9%83%A8%E8%90%BD is 为了部落) you can see.but in guild list (http://xxxx/?guilds=us.) you will find out chinese name will missing ,url will like http://xxxx/?guild=us..

Another question: maybe zhcn is china(cn),for example:http://xxxx/?guild=cn..%E4%B8%BA%E4%BA%86%E9%83%A8%E8%90%BD ? but now is us,I don't know how to fix it or is it based on tc server timezone?

qyh214 commented 2 years ago

suggest fix: [please test and review,or maybe has other solutions] https://github.com/Sarjuuk/aowow/blob/e4b8a8e90888ef93d58543205b4641eb354d951e/static/js/global.js#L22229 replace to str = str;

https://github.com/Sarjuuk/aowow/blob/e4b8a8e90888ef93d58543205b4641eb354d951e/includes/profiler.class.php#L171 replace to $str = $str;

but after fix will broken character tooltip.

In addition: I suggest add all timezone ,now only us and eu.

Sarjuuk commented 2 years ago

timezone is derived from here: https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130016/realmlist#realmlist-timezone but can only resolve to EU or US (default)

as for the original error: It works for me, but it really shouldn't, because the regexes you mentioned should truncate it..? I am confuse. image

image

qyh214 commented 2 years ago

maybe test server name? your server name is trinity ,if is 服务器 for example: /?profile=us.服务器.为了部落

Sarjuuk commented 2 years ago

yup, now it's borked

Sarjuuk commented 2 years ago

probably fixed in 53e2af2116108499d121c4365c0d865871f0b3fe

qyh214 commented 2 years ago

seems well in /?profiles and also /?profile=us.servername.charname. but want to fix:

Sarjuuk commented 2 years ago

a24e8594fbbcb3db2ffa5f6ef79384287d551aa6 fair

qyh214 commented 2 years ago

have test after a24e8594fbbcb3db2ffa5f6ef79384287d551aa6 all fine! thanks a lot.