Support of EUC-JP code page setting #16986

Closed
opened 2026-01-31 05:29:08 +00:00 by claunia · 8 comments
Owner

Originally created by @konemsnq on GitHub (Mar 12, 2022).

Windows Terminal version

No response

Windows build number

11

Other Software

WSL2, power Shell7

Steps to reproduce

same problem like #3373

when i try to open EUC-JP encoding file, the japanese will show ????????,
and i tried to using WSL or powershell, well got same issue.

maybe can supports encoding setting in windows terminal?
just like mac terminal.

Expected Behavior

No response

Actual Behavior

the test file is EUC-JP encoding,
i can't read it in WSL or powershell. is any possible to setting it?

488295FAE4C14DE1B20020F3C9C173B7

Originally created by @konemsnq on GitHub (Mar 12, 2022). ### Windows Terminal version _No response_ ### Windows build number 11 ### Other Software WSL2, power Shell7 ### Steps to reproduce same problem like #3373 when i try to open EUC-JP encoding file, the japanese will show ????????, and i tried to using WSL or powershell, well got same issue. maybe can supports encoding setting in windows terminal? just like mac terminal. ### Expected Behavior _No response_ ### Actual Behavior the test file is EUC-JP encoding, i can't read it in WSL or powershell. is any possible to setting it? ![488295FAE4C14DE1B20020F3C9C173B7](https://user-images.githubusercontent.com/6245459/158007084-7c60ca31-b1f2-45b1-9eb4-04f8abba7b8a.png)
claunia added the Issue-BugResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 05:29:08 +00:00
Author
Owner

@LuanVSO commented on GitHub (Mar 12, 2022):

on powershell you can do

gc file.txt -encoding euc-jp

on cmd you have to

chcp 20932
type file.txt

on wsl/linux you have to

cat file.txt | iconv -f euc-jp -t utf-8
@LuanVSO commented on GitHub (Mar 12, 2022): on powershell you can do ```powershell gc file.txt -encoding euc-jp ``` on cmd you have to ``` cmd chcp 20932 type file.txt ``` on wsl/linux you have to ```bash cat file.txt | iconv -f euc-jp -t utf-8 ```
Author
Owner

@konemsnq commented on GitHub (Mar 14, 2022):

thank you for reply, it can work in localhost,
but i tried to connect other server using ssh, it not working

like #3373 said, it's a open-ssh bug
i also update open-ssh to 8.6 latest, it still error.
so i don't know how to solve this problem

it's my first time using windows to connect server
maybe i miss something,
the encoding problem is difficult to me....

commands like it
on cmd

chcp 20932
type test
:: ->テスト

ssh ubuntu
cat test
:: -> ??????????

or on Powershell

$PSDefaultParameterValues['*:Encoding'] = 'EUC-JP'
$OutputEncoding = [Console]::OutputEncoding
Get-Content test
:: ->テスト

ssh ubuntu
cat test
:: -> ??????????
@konemsnq commented on GitHub (Mar 14, 2022): thank you for reply, it can work in localhost, but i tried to connect other server using ssh, it not working like #3373 said, it's a open-ssh bug i also update open-ssh to 8.6 latest, it still error. so i don't know how to solve this problem it's my first time using windows to connect server maybe i miss something, the encoding problem is difficult to me.... commands like it on cmd ```batchfile chcp 20932 type test :: ->テスト ssh ubuntu cat test :: -> ?????????? ``` or on Powershell ```batchfile $PSDefaultParameterValues['*:Encoding'] = 'EUC-JP' $OutputEncoding = [Console]::OutputEncoding Get-Content test :: ->テスト ssh ubuntu cat test :: -> ?????????? ```
Author
Owner

@LuanVSO commented on GitHub (Mar 14, 2022):

did you tried this one in your ssh session?

cat file.txt | iconv -f euc-jp -t utf-8
@LuanVSO commented on GitHub (Mar 14, 2022): did you tried this one in your ssh session? ```bash cat file.txt | iconv -f euc-jp -t utf-8 ```
Author
Owner

@LuanVSO commented on GitHub (Mar 14, 2022):

image

@LuanVSO commented on GitHub (Mar 14, 2022): ![image](https://user-images.githubusercontent.com/43626415/158228922-2cc4b055-c9c0-47d8-9d47-5e76bd64ca84.png)
Author
Owner

@LuanVSO commented on GitHub (Mar 14, 2022):

also, which ssh are you using?
is it the one included in windows or are you using another one?

@LuanVSO commented on GitHub (Mar 14, 2022): also, which ssh are you using? is it the one included in windows or are you using another one?
Author
Owner

@konemsnq commented on GitHub (Mar 15, 2022):

also, which ssh are you using?
is it the one included in windows or are you using another one?

i using Win32-OpenSSH V8.6.0.0p1-Beta
iconv can show file normally,
if need to edit file , iconv is not good solution.(i can't convert file encode on server)

because Win32-OpenSSH only supports utf-8,
maybe lunt is only solution.
Win32-OpenSSH #1855

sorry I didn't ask very well, 😢
my brain isn't functioning when i post this issue. 🥱

thank you for help, give me very good ideas

@konemsnq commented on GitHub (Mar 15, 2022): > also, which ssh are you using? > is it the one included in windows or are you using another one? i using [Win32-OpenSSH V8.6.0.0p1-Beta](https://github.com/PowerShell/Win32-OpenSSH/releases/tag/V8.6.0.0p1-Beta) `iconv` can show file normally, if need to edit file , `iconv` is not good solution.(i can't convert file encode on server) because Win32-OpenSSH only supports utf-8, maybe `lunt` is only solution. [Win32-OpenSSH #1855](https://github.com/PowerShell/Win32-OpenSSH/issues/1855#ref-issue-1087903141) sorry I didn't ask very well, 😢 my brain isn't functioning when i post this issue. 🥱 thank you for help, give me very good ideas
Author
Owner

@zadjii-msft commented on GitHub (Aug 15, 2022):

After re-reading this thread, yea this sounds like an OpenSSH issue. I'm not sure there's a better thread on their repo, so I'll just link this to /dup https://github.com/PowerShell/Win32-OpenSSH/issues/1855

@zadjii-msft commented on GitHub (Aug 15, 2022): After re-reading this thread, yea this sounds like an OpenSSH issue. I'm not sure there's a better thread on their repo, so I'll just link this to /dup https://github.com/PowerShell/Win32-OpenSSH/issues/1855
Author
Owner

@ghost commented on GitHub (Aug 15, 2022):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Aug 15, 2022): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16986