Tíquete #40865

ソースコードの文字コードにSHIFT-JISが混在している

: 2020-10-18 19:37 Última Atualização: 2020-10-26 00:51

Relator:
Dono:
Estado:
Aberto [Owner assigned]
Componente:
(Nenhum)
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Nenhum
Arquivo:
Nenhum

Details

ソースコード(*.c、*.h)ファイルに、文字コードがSHIFT-JISとなっているものが多数存在します。 おそらく、リファクタリング作業でファイルを分ける時にUTF-8にならずSHIFT-JISとなってしまったものだと思います。 この状態でもビルドはできますがソースコードファイルはUTF-8(BOMつき)で統一したほうがいいでしょう。

参考までに、現在のFor2.2.2-Refactoringブランチの最新コミット(f65cf0c430d7e02628933e5b08bceda1e0022bac)で、以下のファイルがおそらくSHIFT-JISとなっています。

 % file **.c **.h | grep Non-ISO
action/activation-execution.c:             C source, Non-ISO extended-ASCII text
autopick/autopick-finder.c:                C source, Non-ISO extended-ASCII text
autopick/autopick-reader-writer.c:         C source, Non-ISO extended-ASCII text
cmd-io/cmd-floor.c:                        C source, Non-ISO extended-ASCII text
cmd-item/cmd-destroy.c:                    C source, Non-ISO extended-ASCII text
cmd-item/cmd-equipment.c:                  C source, Non-ISO extended-ASCII text
cmd-item/cmd-refill.c:                     C source, Non-ISO extended-ASCII text
core/object-compressor.c:                  C source, Non-ISO extended-ASCII text, with LF, NEL line terminators
effect/effect-player-switcher.c:           C source, Non-ISO extended-ASCII text
floor/line-of-sight.c:                     C source, Non-ISO extended-ASCII text
grid/door.c:                               C source, Non-ISO extended-ASCII text
grid/object-placer.c:                      C source, Non-ISO extended-ASCII text
grid/stair.c:                              C source, Non-ISO extended-ASCII text
info-reader/dungeon-reader.c:              C source, Non-ISO extended-ASCII text
info-reader/kind-reader.c:                 C source, Non-ISO extended-ASCII text
main/angband-headers.c:                    C source, Non-ISO extended-ASCII text
main/game-data-initializer.c:              C source, Non-ISO extended-ASCII text
main/info-initializer.c:                   C source, Non-ISO extended-ASCII text
main/init-error-messages-table.c:          C source, Non-ISO extended-ASCII text
market/building-initializer.c:             C source, Non-ISO extended-ASCII text
mind/mind-archer.c:                        C source, Non-ISO extended-ASCII text
mind/mind-hobbit.c:                        C source, Non-ISO extended-ASCII text
mind/mind-magic-eater.c:                   C source, Non-ISO extended-ASCII text
mind/mind-priest.c:                        C source, Non-ISO extended-ASCII text
monster-floor/monster-death-util.c:        C source, Non-ISO extended-ASCII text
monster-floor/special-death-switcher.c:    C source, Non-ISO extended-ASCII text
object-activation/activation-bolt-ball.c:  C source, Non-ISO extended-ASCII text
object-activation/activation-breath.c:     C source, Non-ISO extended-ASCII text
object-activation/activation-genocide.c:   C source, Non-ISO extended-ASCII text
object-activation/activation-others.c:     C source, Non-ISO extended-ASCII text, with LF, NEL line terminators
object-activation/activation-resistance.c: C source, Non-ISO extended-ASCII text
object-activation/activation-teleport.c:   C source, Non-ISO extended-ASCII text
player-info/base-status-info.c:            C source, Non-ISO extended-ASCII text
player-info/body-improvement-info.c:       C source, Non-ISO extended-ASCII text
player-info/class-ability-info.c:          C source, Non-ISO extended-ASCII text
player-info/mutation-info.c:               C source, Non-ISO extended-ASCII text, with LF, NEL line terminators
player-info/race-ability-info.c:           C source, Non-ISO extended-ASCII text
player-info/resistance-info.c:             C source, Non-ISO extended-ASCII text
player-info/weapon-effect-info.c:          C source, Non-ISO extended-ASCII text
room/vault-builder.c:                      C source, Non-ISO extended-ASCII text
specific-object/blade-turner.c:            C source, Non-ISO extended-ASCII text
specific-object/bloody-moon.c:             C source, Non-ISO extended-ASCII text
specific-object/monster-ball.c:            C source, Non-ISO extended-ASCII text
specific-object/muramasa.c:                C source, Non-ISO extended-ASCII text
specific-object/ring-of-power.c:           C source, Non-ISO extended-ASCII text
specific-object/toragoroshi.c:             C source, Non-ISO extended-ASCII text
spell/technic-info-table.c:                C source, Non-ISO extended-ASCII text
spell-kind/spells-neighbor.c:              C source, Non-ISO extended-ASCII text
spell-realm/spells-arcane.c:               C source, Non-ISO extended-ASCII text
spell-realm/spells-nature.c:               C source, Non-ISO extended-ASCII text, with LF, NEL line terminators
target/projection-path-calculator.c:       C source, Non-ISO extended-ASCII text
view/display-self-info.c:                  C source, Non-ISO extended-ASCII text
io/exit-panic.h:                           C source, Non-ISO extended-ASCII text
main/angband-headers.h:                    C source, Non-ISO extended-ASCII text
spell/summon-types.h:                      C source, Non-ISO extended-ASCII text

Ticket History (3/3 Histories)

2020-10-18 19:37 Updated by: habu
  • New Ticket "ソースコードの文字コードにSHIFT-JISが混在している" created
2020-10-18 19:42 Updated by: hourier
Comentário

For3.0.0-* のブランチで一部修正済です

後ほどこちらでも確認します

2020-10-26 00:51 Updated by: hourier
Comentário

α版リリースの過程でブランチ統合を行うので、そこで実施予定とします

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login