LDIFDE COMMAND to ignore special char on export

hi,
i have a script to export user from my ADAM with ldifde.

i need to now if possible to get result file without special chars, for exemple if a user have a name like François, in the csv file, i need to get Francois (replace ç by c), hors if i have a name like José, i need to get Jose (replace é by e).......



thanks for help
cawasakiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

footechCommented:
I'm no expert on using LDIFDE, but I'm reasonably certain there is no facility exposed by the utility to do this.  I think your best bet is to export to a file, then open with whatever application and do a find and replace for each letter that you're concerned about.  I don't know if someone has already created a utility to do this for "special characters" (especially since I don't know how you would define what special character is), but maybe Google does.

Scripting is another option.  For example the below PowerShell code would read in a file, and replace all the "ç" characters with a "c", then output to the same file.
(Get-Content somefile.txt) -replace "ç","c" | Out-File somefile.txt

Open in new window

0
cawasakiAuthor Commented:
hi,

ok thank you.

i need to do this:
from a windows 2003 server, with powershell v2 installed, i need a script to do this:

get an ldf file and check content, if detect any special char ç, é è ô  ï ö...... or if the file is empty (0ko)==> it send email with the ldf file attached and if possible on email body right wich special char it have detect or if the file is empty tell empty file detected.


if not detect special char and the file is not empty==> copy the ldf file to \\server\folder1\folder2.

are this is possible?

thanks for help
0
footechCommented:
Sorry, this question was about replacing characters.  All the email stuff, copying, and reporting  - that's asking for too much.
It is possible though - just not something I'm willing to spend that much time on.  Perhaps if you asked another question with those requirements in the PowerShell TA someone else would have to the time to write up all that.

You will have to define explicitly which characters you want to replace and what each one's replacement should be.  Below is an example for multiple replacements ( I think you can see the pattern).
(Get-Content somefile.txt) -replace "ç","c" -replace "é","e" -replace "è","e" | Out-File somefile.txt

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cawasakiAuthor Commented:
ok i will open other question now.

thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.