• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
rosewiper / kopost_solr star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
kopost_solrexampleexampledocstest_utf8.sh
Download as .zip file
File name
Commit message
Commit date
bin
첫번째 커밋
06-16
contrib
첫번째 커밋
06-16
dist
첫번째 커밋
06-16
docs
첫번째 커밋
06-16
example
첫번째 커밋
06-16
lib
첫번째 커밋
06-16
licenses
첫번째 커밋
06-16
server
첫번째 커밋
06-16
.project
첫번째 커밋
06-16
CHANGES.txt
첫번째 커밋
06-16
LICENSE.txt
첫번째 커밋
06-16
LUCENE_CHANGES.txt
첫번째 커밋
06-16
NOTICE.txt
첫번째 커밋
06-16
README.txt
첫번째 커밋
06-16
solr_실행 명령어.txt
첫번째 커밋
06-16
File name
Commit message
Commit date
example-DIH
첫번째 커밋
06-16
exampledocs
첫번째 커밋
06-16
files
첫번째 커밋
06-16
films
첫번째 커밋
06-16
resources
첫번째 커밋
06-16
techproducts
첫번째 커밋
06-16
README.txt
첫번째 커밋
06-16
File name
Commit message
Commit date
books.csv
첫번째 커밋
06-16
books.json
첫번째 커밋
06-16
gb18030-example.xml
첫번째 커밋
06-16
hd.xml
첫번째 커밋
06-16
ipod_other.xml
첫번째 커밋
06-16
ipod_video.xml
첫번째 커밋
06-16
manufacturers.xml
첫번째 커밋
06-16
mem.xml
첫번째 커밋
06-16
money.xml
첫번째 커밋
06-16
monitor.xml
첫번째 커밋
06-16
monitor2.xml
첫번째 커밋
06-16
mp500.xml
첫번째 커밋
06-16
post.jar
첫번째 커밋
06-16
sample.html
첫번째 커밋
06-16
sd500.xml
첫번째 커밋
06-16
solr-word.pdf
첫번째 커밋
06-16
solr.xml
첫번째 커밋
06-16
test_utf8.sh
첫번째 커밋
06-16
utf8-example.xml
첫번째 커밋
06-16
vidcard.xml
첫번째 커밋
06-16
rosewiper 06-16 9dd39d2 첫번째 커밋 UNIX
Raw Open in browser Change history
#!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #Test script to tell if the server is accepting UTF-8 #The python writer currently escapes non-ascii chars, so it's good for testing URL=http://localhost:8983/solr if [ ! -z $1 ]; then URL=$1 fi curl "$URL/select?q=hello&params=explicit&wt=python" 2> /dev/null | grep 'hello' > /dev/null 2>&1 if [ $? = 0 ]; then echo "Solr server is up." else echo "ERROR: Could not curl to Solr - is curl installed? Is Solr not running?" exit 1 fi curl "$URL/select?q=h%C3%A9llo&echoParams=explicit&wt=python" 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1 if [ $? = 0 ]; then echo "HTTP GET is accepting UTF-8" else echo "ERROR: HTTP GET is not accepting UTF-8" fi curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1 if [ $? = 0 ]; then echo "HTTP POST is accepting UTF-8" else echo "ERROR: HTTP POST is not accepting UTF-8" fi curl $URL/select --data-binary 'q=h%C3%A9llo&echoParams=explicit&wt=python' 2> /dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1 if [ $? = 0 ]; then echo "HTTP POST defaults to UTF-8" else echo "HTTP POST does not default to UTF-8" fi #A unicode character outside of the BMP (a circle with an x inside) CHAR="𐌈" CODEPOINT='0x10308' #URL encoded UTF8 of the codepoint URL_UTF8='%F0%90%8C%88' #expected return of the python writer (currently uses UTF-16 surrogates) EXPECTED='\\ud800\\udf08' curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" 2> /dev/null | grep $EXPECTED > /dev/null 2>&1 if [ $? = 0 ]; then echo "HTTP GET is accepting UTF-8 beyond the basic multilingual plane" else echo "ERROR: HTTP GET is not accepting UTF-8 beyond the basic multilingual plane" fi curl $URL/select --data-binary "q=$URL_UTF8&echoParams=explicit&wt=python" -H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1 if [ $? = 0 ]; then echo "HTTP POST is accepting UTF-8 beyond the basic multilingual plane" else echo "ERROR: HTTP POST is not accepting UTF-8 beyond the basic multilingual plane" fi curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=python" --data-binary '' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1 if [ $? = 0 ]; then echo "HTTP POST + URL params is accepting UTF-8 beyond the basic multilingual plane" else echo "ERROR: HTTP POST + URL params is not accepting UTF-8 beyond the basic multilingual plane" fi #curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | od -tx1 -w1000 | sed 's/ //g' | grep 'f4808198' > /dev/null 2>&1 curl "$URL/select?q=$URL_UTF8&echoParams=explicit&wt=json" 2> /dev/null | grep "$CHAR" > /dev/null 2>&1 if [ $? = 0 ]; then echo "Response correctly returns UTF-8 beyond the basic multilingual plane" else echo "ERROR: Response can't return UTF-8 beyond the basic multilingual plane" fi

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up