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

Garbled exception information in Chinese Enviornment(after rmarkdown::render ) #156

Open
dwanboweb opened this issue Mar 8, 2023 · 0 comments

Comments

@dwanboweb
Copy link

dwanboweb commented Mar 8, 2023

I use REngine to render a RMARKDOWN file encoded in utf-8 into html in a Chinese environment:

                   try
                    {
                       engine.Evaluate(@"Sys.setlocale(""LC_ALL"", ""Chinese"")")
                        string htmlFile = engine.Evaluate(@"rmarkdown::render(randerfilepath,output_file=htmlpath,encoding='utf-8')", en).AsCharacter()[0];
                        rs.sucess = true;
                        rs.htmlFile = htmlFile;
                        return rs;
                    }
                    catch (Exception ex)
                   {
                    //ex,Message garbled ,such as :   Error in library(‘gt’):???‘gt’???,
                   }

Whenever an exception occurs, the non-English part of the exception information is garbled (for example, it will prompt: Error in library(‘gt’):???‘gt’???, I guess the real error message is: missing ‘gt’ package). What should I do?
Thank you.

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