Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy: how to add bom in csv file? #7

Open
MickVazovsky opened this issue Nov 8, 2024 · 0 comments
Open

Groovy: how to add bom in csv file? #7

MickVazovsky opened this issue Nov 8, 2024 · 0 comments

Comments

@MickVazovsky
Copy link

MickVazovsky commented Nov 8, 2024

This example not working, help?

    def file = new File('C:/Temp/sample.csv')
    file.withWriter('UTF-8') {
                it.writeLine 'Привет друг, я рад тебя видеть!'
            }

		 file.getText('UTF-8')
		 String encoded = file.bytes.encodeBase64().toString()

Result:

Привет друг, я рад тебя видеть!

@MickVazovsky MickVazovsky changed the title How to add bom in csv file? Groovy: how to add bom in csv file? Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant