Jump to content
Korean Random

Chirimen

User
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

5 Noob

1 Follower

Contacts

  • Nick
    Chirimen

Recent Profile Visitors

603 profile views
  1. my mod has been reviewed, and marked published. but the mod's page https://wgmods.net/3044/ is 404 not found. why?
  2. thanks @Ekspoint, but unfortunately it did not work. the hook to afterCreate of AppEntry is success, but addExternalCallback does not seem to work or it`s maybe removed somewhere. AS3: DebugUtils.LOG_ERROR("this is ERROR message"); DebugUtils.LOG_DEBUG("this is DEBUG message"); DebugUtils.LOG_WARNING("this is WARNING message"); python.log in 1.5.0.0 CT with hook or without hook: 2019-04-21 09:33:19.150: ERROR: this is ERROR message 2019-04-21 09:33:19.150: WARNING: this is WARNING message python.log in 1.4.1.2 without hook: 2019-04-21 09:54:03.108: DEBUG: [gui.Scaleform.Flash] ERROR.GUI: 'this is ERROR message', () 2019-04-21 09:54:03.108: DEBUG: [gui.Scaleform.Flash] DEBUG.GUI: 'this is DEBUG message', () 2019-04-21 09:54:03.108: DEBUG: [gui.Scaleform.Flash] WARNING.GUI: 'this is WARNING message', ()
  3. thanks, I tried it, but it did not move. in WoT 1.4.1.2, class Flash has following methods, def afterCreate(self): self.addExternalCallback('debug.LOG_GUI', self.__onLogGui) self.addExternalCallback('debug.LOG_GUI_FORMAT', self.__onLogGuiFormat) but in WoT 1.5.0.0 CT, the method of class FlashComponentWrapper is follows, def afterCreate(self): pass and not defined in class Flash.
  4. in WoT 1.4.1.2, to enable Flash debug output (using "DebugUtils.LOG_DEBUG") import logging logging.getLogger('gui.Scaleform.Flash').setLevel(logging.DEBUG) how to eneble "DebugUtils.LOG_DEBUG" in WoT 1.5.0.0 CT ?
  5. @Finister @ribbed I am the author of this mod, the links are proving here: http://forum.worldoftanks.asia/index.php?/topic/69879-saveaccount-yet-another-save-password/, https://wgmods.net/736/ On wgmods the copied code without my permission is found: https://wgmods.net/1831/ Please remove this mod. thanks.
  6. I updated my mod https://wgmods.net/669/ and submitted an update application to the modhub. But unfortunately it was rejected, and the moderator said "mod does not work". The code is just a little change, there is no major change related to the function. Of course the mod works. I wonder why it was rejected. What kind of examination is being done?
  7. I tried import "scripts/common/Lib/encodings/cp932.py" with mod replserver. "cp932.py" is included in WoT client. the result is "ImportError: No module named _multibytecodec" maybe cannot import "_multibytecodec.pyd" in com.modxvm.xfw.native_1.0.9.00039.wotmod for some reason.
  8. In current version, XVM-7.5.6, clock in hangar is error on japanese locale (maybe on other multibyte chars locales). "LookupError: unknown encoding: cp932" encoding cp932 is used for japanese window, but it's not included in python module with WoT client. this problems similar to the topic: Clock in hangar: error with Japanese Windows error log:
  9. in current version, XVM-7.5.6, clock in hangar is disabled on japanese locale (maybe on other multibyte chars locales).
  10. good. encode/decode is working. thanks to Mixaill. I have one more request. xvm_formatDate()'s arg formatDate is utf8 string, so formatDate should be translated to loc before send to strftime(), following. def xvm_formatDate(formatDate): def createDict(value, formatDate): global d s = time.strftime('%{}'.format(value[0])).decode(loc) d[value] = s.title() if value[1] == 'u' else s.lower() return formatDate.replace('%{}'.format(value), '{%s}' % value) global d d = {} formatDate = formatDate.decode('utf8').encode(loc) if '%au' in formatDate: formatDate = createDict('au', formatDate)
  11. hi Mixaill in cp932, strftime use only a few multibyte chars, so could translate to utf-8 with short code. for example, map_cp932_utf8 = { '\x93\xfa': '\xe6\x97\xa5', # U+65E5, Unicode Han Character 'sun; day; daytime' '\x8c\x8e': '\xe6\x9c\x88', # U+6708, Unicode Han Character 'moon; month; KangXi radical 74' '\x89\xce': '\xe7\x81\xab', # U+706B, Unicode Han Character 'fire, flame; burn; anger, rage' '\x90\x85': '\xe6\xb0\xb4', # U+6C34, Unicode Han Character 'water, liquid, lotion, juice' '\x96\xd8': '\xe6\x9c\xa8', # U+6728, Unicode Han Character 'tree; wood, lumber; wooden' '\x8b\xe0': '\xe9\x87\x91', # U+91D1, Unicode Han Character 'gold; metals in general; money' '\x93\x79': '\xe5\x9c\x9f', # U+571F, Unicode Han Character 'soil, earth; items made of earth' '\x97\x6a': '\xe6\x9b\x9c', # U+66DC, Unicode Han Character 'glorious, as sun; daylight, sunlight; one of the seven planets of pre-modern astronomy (the sun, the moon, Mercury, Venus, Mars, Jupiter, and Saturn)' '\x94\x4e': '\xe6\x9b\x9c', # U+5E74, Unicode Han Character 'year; new-years; person's age' '\x8e\x9e': '\xe6\x9b\x9c', # U+6642, Unicode Han Character 'time, season; era, age, period' '\x95\xaa': '\xe6\x9b\x9c', # U+5206, Unicode Han Character 'divide; small unit of time etc.' '\x95\x62': '\xe6\x9b\x9c', # U+79D2, Unicode Han Character 'beard of grain or corn; a second' } def _translate_from_subset_cp932_to_utf8(src): dst = '' s = '' for c in src: if s: s = s + c dst = dst + map_cp932_utf8[s] s = '' else: if ord(c) >= 0x80: s = c continue dst = dst + c return dst sample xvm.py attached, but I don't know other multibyte locale, ie, chinese and korean. so the sample is only for japanese. more preferable method, all strftime directive is convert to dict. for py:xvm.formatDate()'s arg allow multibyte chars xvm.zip
  12. if codec is not found, fallback to locale C # Date and time import locale import codecs d = {} loc = locale.getdefaultlocale()[1] try: codecs.lookup(loc) except LookupError: locale.setlocale(locale.LC_ALL, 'C') loc = 'ascii' @xvm.export('xvm.formatDate', deterministic=False) def xvm_formatDate(formatDate): def createDict(value, formatDate): global d s = time.strftime('%{}'.format(value[0])).decode(loc) d[value] = s.title() if value[1] == 'u' else s.lower() return formatDate.replace('%{}'.format(value), '{%s}' % value) global d d = {} if '%au' in formatDate: formatDate = createDict('au', formatDate) if '%al' in formatDate: formatDate = createDict('al', formatDate) if '%Au' in formatDate: formatDate = createDict('Au', formatDate) if '%Al' in formatDate: formatDate = createDict('Au', formatDate) if '%bu' in formatDate: formatDate = createDict('bu', formatDate) if '%bl' in formatDate: formatDate = createDict('bl', formatDate) if '%Bu' in formatDate: formatDate = createDict('Bu', formatDate) if '%Bl' in formatDate: formatDate = createDict('Bl', formatDate) t = time.strftime(formatDate).decode(loc) return t.format(**d)
  13. hi ktulho, thanks patch, but doesn't work with same error. 2017-04-21 19:10:24: [ERROR] Traceback (most recent call last): File "./res_mods/mods/packages\xvm_main\python\python_macro.py", line 157, in process_python_macro return (func(), deterministic) File "./res_mods/mods/packages\xvm_main\python\python_macro.py", line 150, in <lambda> return (lambda: func(*args), deterministic) File "res_mods/configs/xvm/py_macro\xvm.py", line 44, in xvm_formatDate t = time.strftime(formatDate).decode(locale.getdefaultlocale()[1]).encode('utf8') LookupError: unknown encoding: cp932 arg='xvm.formatDate('%H:%M')' I think original xvm.py is valid code. encoding cp932 is defined in res/scripts/common/Lib/encodings/cp932.py, and this code exists in WoT. but cp932.py failed to import _codecs_jp and _multibytecodec, because they doesn't exist. usually they are builtin python module and dll written in C. so disabled multibyte encodings, such as cp932, big5 and so on.
×
×
  • Create New...