logo
down
shadow

How to prevent commits in SVN that have log messages containing Chinese characters?


How to prevent commits in SVN that have log messages containing Chinese characters?

By : Jinoj
Date : November 21 2020, 07:31 AM
it should still fix some issue Don't change commit messages. If it is even possible you might alter the meaning of the message. Better way is to prevent any commit messages violating your rules, in your case using Chinese characters.
If someone uses forbidden characters user will see a message and commit will be rejected.
code :
#!/bin/sh

REPOS="$1"
TXN="$2"

FOUND=$(svnlook log -t "$TXN" "$REPOS" | tr -d '\n' | grep  "[^\x00-\x7F]" )

if [ "$FOUND" != "" ]
then
    exit 0
else 
    echo "Reject commit! Do not use non ASCCI in commit messages!" 1>&2 && exit 1
fi


Share : facebook icon twitter icon
How can I find commits with commit messages less than N characters?

How can I find commits with commit messages less than N characters?


By : Kiril V
Date : March 29 2020, 07:55 AM
will be helpful for those in need Something like this? Replace HEAD with any revision range and 80 with whatever your mininum commit message characters should be.
code :
git rev-list HEAD |
    xargs -iX sh -c\
        "if test \"\$(git show --quiet --pretty=format:%s%n%n%b X | wc -c)\" -lt 80; then echo X; fi"
Prevent browser converting '\n' between lines into space (for Chinese characters)

Prevent browser converting '\n' between lines into space (for Chinese characters)


By : Stephanie Walters
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Browsers treat newlines as spaces because the specifications say so, ever since HTML 2.0. In fact, HTML 2.0 was milder than later specifications; it said: “An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text.” (Conventional Representation of Newlines), whereas newer specifications say this stronger (describing it as what happens in HTML).
The background is that HTML and the Web was developed with mainly Western European languages in mind; this is reflected in many features of the original specifications and early implementations. Only slowly have they been internationalized.
Convert Chinese characters in Percent-Encoded URI string to Chinese characters in UTF-8?

Convert Chinese characters in Percent-Encoded URI string to Chinese characters in UTF-8?


By : PoShan Leang
Date : March 29 2020, 07:55 AM
To fix the issue you can do Okay, I am not sure if I am phrasing this correctly but I am given url in the following form: , In JavaScript
code :
alert(decodeURI("http://zh.wikipedia.org/wiki/%E5%A4%A9%E6%96%87%E5%AD%B8"))​
How to make Haskell or ghci able to show Chinese characters and run Chinese characters named scripts?

How to make Haskell or ghci able to show Chinese characters and run Chinese characters named scripts?


By : marco puga
Date : March 29 2020, 07:55 AM
I hope this helps you . I want to make a Haskell script to read files in my /home folder. However there are many files named with Chinese characters, and Haskell and Ghci cannot manage it. It seems Haskell and Ghci aren't good at displaying UTF-8 characters.
code :
Prelude> putStrLn "\35753Haskell\25110\32773Ghci\33021\27491\30830\26174\31034\27721\23383\24182\19988\35835\21462\27721\23383\21629\21517\30340\25991\26723"
让Haskell或者Ghci能正确显示汉字并且读取汉字命名的文档
Prevent merge to master if branch has commits with messages of certain criteria

Prevent merge to master if branch has commits with messages of certain criteria


By : prasanna haritas
Date : March 29 2020, 07:55 AM
around this issue You can implement custom prehooks that will be run on Bitbucket server using the (commercial) Script Runner add-on.
It has a number of "pre-receive hook" scripts built-in that will be executed on Bitbucket when someone does a push and depending on the outcome the push is accepted or rejected and the person who executes the push gets a message describing possible problems. You can also implement your own "pre-receive hook" scripts in Groovy.
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org