Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Hebrew fonts in powershell

Reply
 
Old 08-19-2007   #1 (permalink)
Did


 
 

Hebrew fonts in powershell

Hi all,

First - I think this topic can be valid not only to the Hebrew
language and powershell.

While I user Get-qaduser to get group memberships of user, part of the
group the users are members in Hebrew in the AD.

Now, while the script run, if I copy from the powershell the "strange"
characters and paste it into Notepad I see the Hebrew OK, but while
the script write it to Notepad I see only question marks.

This is the script:

$File_Title = "Groups of users"
out-file -filepath C:\scripts\monad\groups.txt -inputobject `
$File_Title -encoding ASCII -width 50;

$users = get-content C:\scripts\monad\member_of_project.txt
$counter = $users.Length
write-host $counter

for ($u = 0 ; $u -le $counter; $u++ )
{
write-host "working on user " $users[$u] -f yellow
$MemberOf = (Get-QADUser $users[$u]).MemberOf
foreach ( $group in $MemberOf )
{
$groupDN = get-qadgroup $group
$groupCN = $groupDN.cn
write-host $groupCN
$Write_to_file = $groupCN
Out-File -filePath C:\scripts\monad\groups.txt `
-append -inputObject $Write_to_file -encoding ASCII -width 50;
}
}


My System SpecsSystem Spec
Old 08-19-2007   #2 (permalink)
Matthias Tacke


 
 

Re: Hebrew fonts in powershell

Did wrote:
> Hi all,
>
> First - I think this topic can be valid not only to the Hebrew
> language and powershell.
>
> While I user Get-qaduser to get group memberships of user, part of the
> group the users are members in Hebrew in the AD.
>
> Now, while the script run, if I copy from the powershell the "strange"
> characters and paste it into Notepad I see the Hebrew OK, but while
> the script write it to Notepad I see only question marks.
>


Hi Did,
Out-file does what it sounds like (not to notepad), and if you explicitly
use -encoding ASCII instead of leaving the standard UNICODE the result
might be expectable ;-)

> Out-File -filePath C:\scripts\monad\groups.txt `
> -append -inputObject $Write_to_file -encoding ASCII -width 50;


Out-File -filePath C:\scripts\monad\groups.txt `
-append -inputObject $Write_to_file -width 50;

could do better in your case.

HTH

--
Greetings
Matthias
My System SpecsSystem Spec
Old 08-20-2007   #3 (permalink)
Did


 
 

Re: Hebrew fonts in powershell

On Aug 19, 10:23 am, Matthias Tacke <Matth...@Tacke.de> wrote:
> Did wrote:
> > Hi all,

>
> > First - I think this topic can be valid not only to the Hebrew
> > language and powershell.

>
> > While I user Get-qaduser to get group memberships of user, part of the
> > group the users are members in Hebrew in the AD.

>
> > Now, while the script run, if I copy from the powershell the "strange"
> > characters and paste it into Notepad I see the Hebrew OK, but while
> > the script write it to Notepad I see only question marks.

>
> Hi Did,
> Out-file does what it sounds like (not to notepad), and if you explicitly
> use -encoding ASCII instead of leaving the standard UNICODE the result
> might be expectable ;-)
>
> > Out-File -filePath C:\scripts\monad\groups.txt `
> > -append -inputObject $Write_to_file -encoding ASCII -width 50;

>
> Out-File -filePath C:\scripts\monad\groups.txt `
> -append -inputObject $Write_to_file -width 50;
>
> could do better in your case.
>
> HTH
>
> --
> Greetings
> Matthias




Hi,
For Hebrew I solved the problem by insert the UTF8 where the ASCII
was.
Now it's work.

Thanks,
Didi

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Fonts - signature font lost in list of fonts Vista mail
Hebrew speller Vista General
Can't see Hebrew fonts in Vista Media Center Vista music pictures video
Add additional language – Hebrew Vista mail
Hebrew UI for Vista RC1 Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46