Buggy code:
public class Link extends Control { String text ; TextLayout layout ; Color linkColor ; Point [ ] offsets ; Point selection ; String [ ] ids ; int [ ] mnemonics ; int focusIndex ; int font ; static final int LinkProc ; static final TCHAR LinkClass = new TCHAR ( 0 , OS . WC_LINK , true ) ; public Link ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { checkWidget ( ) ; if ( ( wHint != ( SWT . DEFAULT ) ) && ( wHint < 0 ) ) wHint = 0 ; if ( ( hHint != ( SWT . DEFAULT ) ) && ( hHint < 0 ) ) hHint = 0 ; int width ; int height ; if ( ( OS . COMCTL32_MAJOR ) >= 6 ) { int hDC = OS . GetDC ( handle ) ; int newFont = OS . SendMessage ( handle , WM_GETFONT , 0 , 0 ) ; int oldFont = OS . SelectObject ( hDC , newFont ) ; <START_BUG> TCHAR buffer = new TCHAR ( getCodePage ( ) , text , false ) ; <END_BUG> RECT rect = new RECT ( ) ; int flags = OS . DT_CALCRECT ; boolean wrap = wHint != ( SWT . DEFAULT ) ; if ( wrap ) { flags |= OS . DT_WORDBREAK ; rect . right = wHint ; } OS . DrawText ( hDC , buffer , buffer . length ( ) , rect , flags ) ; width = ( rect . right ) - ( rect . left ) ; height = ( wrap ) ? rect . bottom : OS . SendMessage ( handle , LM_GETIDEALHEIGHT , 0 , 0 ) ; if ( newFont != 0 ) OS . SelectObject ( hDC , oldFont ) ; OS . ReleaseDC ( handle , hDC ) ; } else { int layoutWidth = layout . getWidth ( ) ; if ( wHint == 0 ) { layout . setWidth ( 1 ) ; Rectangle rect = layout . getBounds ( ) ; width = 0 ; height = rect . height ; } else { layout . setWidth ( wHint ) ; Rectangle rect = layout . getBounds ( ) ; width = rect . width ; height = rect . height ; } layout . setWidth ( layoutWidth ) ; } if ( wHint != ( SWT . DEFAULT ) ) width = wHint ; if ( hHint != ( SWT . DEFAULT ) ) height = hHint ; int border = getBorderWidth ( ) ; width += border * 2 ; height += border * 2 ; return new Point ( width , height ) ; } void createHandle ( ) { } void createWidget ( ) { } void enableWidget ( boolean enabled ) { } String getNameText ( ) { } Rectangle [ ] getRectangles ( int linkIndex ) { } public String getText ( ) { } void onPaint ( GC gc , RECT rect ) { } String parse ( String string ) { } int parseMnemonics ( char [ ] buffer , int start , int end , StringBuffer result ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setText ( String string ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_GETFONT ( int wParam , int lParam ) { } LRESULT WM_KEYDOWN ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_LBUTTONUP ( int wParam , int lParam ) { } LRESULT WM_MOUSEMOVE ( int wParam , int lParam ) { } LRESULT WM_PAINT ( int wParam , int lParam ) { } LRESULT WM_PRINTCLIENT ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFONT ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( int wParam , int lParam ) { } }

Fix:
TCHAR buffer = new TCHAR ( getCodePage ( ) , parse ( text ) , false ) ;