haskell-jp / general #6

@igrep pinned a message to this channel.
回答期間は、約2週間後の4月11日 08:00までです。
(すみません、一度公開してからでは自動で回答締め切りするのが難しそうなのでやっぱり自分でOFFにできる時間帯にします)
@ has joined the channel
MIYATA Tadaaki
@MIYATA Tadaaki has joined the channel
@ has joined the channel
MIYATA Tadaaki
趣味で、HaskellでFXのシストレを作ってます。よろしくお願いします。
@Akito has joined the channel
@tkch-pe has joined the channel
@nh2 has joined the channel
hi, are there any Japanese Haskell users with Windows around that could try
import GHC.IO.Encoding
getForeignEncoding

for me and tell me what it outputs? I'm trying to fix a bug in Haskell's rocksdb bindings
From my console:

λ stack exec ghci
GHCi, version 8.2.2:   :? for help
Loaded GHCi configuration from C:\Users\igrep\Dropbox\dot-files\dot-files\.ghci
[Prelude]
> import GHC.IO.Encoding
[Prelude GHC.IO.Encoding]
> getForeignEncoding
CP932
@watiko has joined the channel
@igrep Thanks a lot. How did you get this setting? Is it what happens when you install a Japanese Windows edition (and which version?), or after changing it from an English install? I'm trying to set my system so I also get CP932
What it outputs, is really depending on the code page which the command prompt (or powershell) uses, by default Windows Japanese edition set it to CP932. If you get other than this, you need to change it to CP932 by calling chcp 932 before running haskell or (I believe) you can use Japanese edition.
Yes, that makes sense. I'm just asking because I want to test my changes on as realistic a Japanese system as I can get (to reproduce the bug found by users reported to run on Japanese Windows), and I'm not sure if just the chcp 932 is enough.
The setting sets set this default seems to be https://knowledgebase.progress.com/articles/Article/4677:
Open Windows Control Panel
Select Region and Language
Click on the Administrative tab
Under Language for non-Unicode programs, click on Change System Locale
I set this to Japanese (Japan) and after a reboot I got CP932 in the ghci
If the bug (maybe) rely on the result of getForeignEncoding then, I think chcp 932 is just enough, since if we put chcp 65001 and then run getForeignEncoding, it outputs UTF-8, as we intended the result to be.
I agree with りんご姫. If the error is related to character encoding, chcp 65001 or chcp 20127 is usually a sufficient workaround.
If your error is similar to one referred in https://haskell.jp/blog/posts/2017/windows-gotchas.html, codes in the article would help you.
(Sorry, this is not translated into English yet...)
こちらですが残り一週間を切りました。大分集まったようですがまだまだ投票は受け付けているので是非! hask(_ _)eller

@ has joined the channel
はじめまして、普段はwebアプリをつくるため、pythonやらjavaを書いています。Haskellに最近興味がわいて学習しています。
初心者ですがよろしくお願いいたします。
@ has joined the channel
@nasa has joined the channel
@igrep @りんご姫 thanks a lot!
Also your linked article seems to be very relevant to me right now.
Can you tell me, does ghc itself usually work when working under the Japenese locale?
For me, when I run stack exec -- ghc --version with the locale set to Japanese, I get
C:\Users\
ghc-pkg.EXE: <stdout>: commitBuffer: invalid argument (invalid character)

Is that the same for you?
GHC should work under the Japanese locale usually...
> stack exec ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.2.2

Hmmm... You might have got a bug of GHC...?:confused:
@igrep I'm also not sure what's going on, I just installed it with the stack installer https://www.stackage.org/stack/windows-x86_64-installer
@igrep just to double check, for me it fails when I have both the Japanese locale and a Japanese user name, do you think this combination should work?
because that funny newline split is exactly where the user name should be
@nh2 Oh, yeah, it can be related.
Because GHC installed via stack is usually installed under %LOCALAPPDATA%.
E.g.
> stack exec which ghc
/c/Users/Yuji/AppData/Local/Programs/stack/x86_64-windows/ghc-8.2.2/bin/ghc
We know we should avoid making %USERPROFILE% contain Japanese name, which causes some errors.
@igrep Is that also written down / documented somewhere? I would like to know more about it, maybe I can even fix it
Hmmm... Sorry, I don't know the detail. Maybe we're too accustomed to avoid Japanese characters before fixing it... :disappointed_relieved:
第1回Haskell-jpロゴ選挙、投票期間が残り24時間を切りました。
まだ投票していないという方はお急ぎください!
https://docs.google.com/forms/d/e/1FAIpQLSdBR3hal7RdXnF2BML3qXCyEUnA7NoZ00dLY4_y4CLtikfTtQ/viewform
@igrep no worries, knowing that this is a known problem already helps a lot, so I know it isn't a fault of my setup
@h-michael has joined the channel
こんにちは、はじめましてXmonadからHaskellに入ってきました、よろしくお願いします :pray:
@igrep uploaded a file: 第1回 Haskell jp 新ロゴ選挙 結果.png and commented: !here 第1回Haskell-jp 新ロゴ選挙、投票受付を完了しました。
次のような結果になりました!
A案に決定です!作成した @fumievalさんありがとうございました!
@ has joined the channel
@yoshitsugu has joined the channel
@maeken2010 has joined the channel
@ has joined the channel
Haskell大好きな高校生です。よろしくお願いします!
@ has joined the channel
@a_kawashiro has joined the channel