File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ RUN /playground/attach_notice.sh /playground/security_notice.txt /etc/passwd &&
4141COPY --chown=playground --from=dependencies target/dependency /playground/dependencies
4242COPY --chown=playground --from=jre jre /playground/jre
4343
44+ # Install locale for proper Unicode support
45+ RUN apt-get update && \
46+ apt-get -y install locales && \
47+ sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
48+ locale-gen
49+ ENV LANG en_US.UTF-8
50+
4451USER playground
4552ENV USER=playground
4653ENV PATH=/playground/jre/bin:$PATH
Original file line number Diff line number Diff line change @@ -679,6 +679,28 @@ mod test {
679679 assert ! ( resp. stdout. contains( "Hello, world!" ) ) ;
680680 }
681681
682+ #[ tokio:: test]
683+ async fn unicode ( ) {
684+ let _singleton = one_test_at_a_time ( ) ;
685+ let code = r#"
686+ public class Main {
687+ public static void main(String[] args) {
688+ System.out.println("Привет, мир!");
689+ }
690+ }
691+ "# ;
692+
693+ let req = ExecuteRequest {
694+ code : code. to_string ( ) ,
695+ ..ExecuteRequest :: default ( )
696+ } ;
697+
698+ let sb = Sandbox :: new ( ) . await . expect ( "Unable to create sandbox" ) ;
699+ let resp = sb. execute ( & req) . await . expect ( "Unable to execute code" ) ;
700+
701+ assert ! ( resp. stdout. contains( "Привет, мир!" ) ) ;
702+ }
703+
682704 #[ tokio:: test]
683705 async fn network_connections_are_disabled ( ) {
684706 let _singleton = one_test_at_a_time ( ) ;
You can’t perform that action at this time.
0 commit comments